Codeforces Round 368 (Div. 2)
C
Pythagorean Triples
Codeforces
1500
原题
← BD →
翻译中…

Katya studies in a fifth grade. Recently her class studied right triangles and the Pythagorean theorem. It appeared, that there are triples of positive integers such that you can construct a right triangle with segments of lengths corresponding to triple. Such triples are called Pythagorean triples.

翻译中…

For example, triples $(3, 4, 5)$, $(5, 12, 13)$ and $(6, 8, 10)$ are Pythagorean triples.

翻译中…

Here Katya wondered if she can specify the length of some side of right triangle and find any Pythagorean triple corresponding to such length? Note that the side which length is specified can be a cathetus as well as hypotenuse.

翻译中…

Katya had no problems with completing this task. Will you do the same?

翻译中…

Input

翻译中…

The only line of the input contains single integer $*n*$ ($1 ≤ *n* ≤ 10^{9}$) — the length of some side of a right triangle.

翻译中…

Output

翻译中…

Print two integers $*m*$ and $*k*$ ($1 ≤ *m*, *k* ≤ 10^{18}$), such that $*n*$, $*m*$ and $*k*$ form a Pythagorean triple, in the only line.

翻译中…

In case if there is no any Pythagorean triple containing integer $*n*$, print $- 1$ in the only line. If there are many answers, print any of them.

翻译中…

Note

翻译中…

imageIllustration for the first sample.

翻译中…

样例

Input #1
3
Output #1
4 5
InputCopy OutputCopy
Input #2
6
Output #2
8 10
InputCopy OutputCopy
Input #3
1
Output #3
-1
InputCopy OutputCopy
Input #4
17
Output #4
144 145
InputCopy OutputCopy
Input #5
67
Output #5
2244 2245
InputCopy OutputCopy
题目信息
题号
707C
时间限制
1 s
内存限制
256 MB
标签
数学
数论

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。