Etched Emerald Orbs

아직 제출이 없습니다시간 제한3초메모리 제한1024 MB

문제

An archaeologist team found a tomb of the ancient tribe and discovered 21252^{125} 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 11 to 21252^{125} in the ancient language.

Eddy, the only mathematician in the archaeologist team, recently figured out the relation between the number kk and the emerald orb numbered kk. The weight of the emerald orb numbered kk is exactly 1k\frac{1}{k} 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 11 gram. It is trivial that the emerald orb numbered kk can represent 1k\frac{1}{k} gram. Then, Eddy tries to represent 2k\frac{2}{k} grams for 3k4×10183 ≤ k ≤ 4 × 10^{18} with two emerald orbs. He successfully finds that the emerald orbs numbered 22 and 66 can represent 23=12+16\frac{2}{3} = \frac{1}{2} + \frac{1}{6} grams. Similarly, the emerald orbs numbered 33 and 1515 can represent 25=13+115\frac{2}{5} = \frac{1}{3} + \frac{1}{15} grams.

Can you write a program to help Eddy to check whether two emerald orbs can represent 2k\frac{2}{k} grams for a given integer kk? If there are multiple combinations of two emerald orbs representing 2k\frac{2}{k} grams, output the combination minimizing the sum of the numbers etched on them. If there is no such combination, output 1-1.

입력

The input contains only one positive integer kk.

출력

If there is no solution, output 1-1. Otherwise, output two distinct integers xx and yy separated by a blank where 2k=1x+1y\frac{2}{k} = \frac{1}{x} + \frac{1}{y} and 1x<y21251 ≤ x < y ≤ 2^{125}. If there are multiple solutions, output the solution minimizing x+yx + y.

제한

  • 3k4×10183 ≤ k ≤ 4 × 10^{18}.