An archaeologist team found a tomb of the ancient tribe and discovered 2125 emerald orbs inside the tomb. The ancient tribe etched a numbers on each emerald orb. The archeologists spent two decades realizing that the ancient tribe etched each emerald orb with a unique number. Moreover, the numbers are from 1 to 2125 in the ancient language.
Eddy, the only mathematician in the archaeologist team, recently figured out the relation between the number k and the emerald orb numbered k. The weight of the emerald orb numbered k is exactly k1 grams. Since the number on each emerald orb is distinct from the number on any other emerald orb, there are no two emerald orbs having the same weight.
Eddy proposes a hypothesis: the ancient tribe used these emerald orbs to represent weight less than 1 gram. It is trivial that the emerald orb numbered k can represent k1 gram. Then, Eddy tries to represent k2 grams for 3≤k≤4×1018 with two emerald orbs. He successfully finds that the emerald orbs numbered 2 and 6 can represent 32=21+61 grams. Similarly, the emerald orbs numbered 3 and 15 can represent 52=31+151 grams.
Can you write a program to help Eddy to check whether two emerald orbs can represent k2 grams for a given integer k? If there are multiple combinations of two emerald orbs representing k2 grams, output the combination minimizing the sum of the numbers etched on them. If there is no such combination, output −1.
The input contains only one positive integer k.
If there is no solution, output −1. Otherwise, output two distinct integers x and y separated by a blank where k2=x1+y1 and 1≤x<y≤2125. If there are multiple solutions, output the solution minimizing x+y.