#C3432. Find Positive Integer Pair Satisfying Sum of Squares

    ID: 46859 Type: Default 1000ms 256MiB

Find Positive Integer Pair Satisfying Sum of Squares

Find Positive Integer Pair Satisfying Sum of Squares

Given a positive integer \(N\), determine whether there exist two positive integers \(x\) and \(y\) such that \(x^2 + y^2 = N\). If such a pair exists, output one pair \((x, y)\); otherwise, output \(-1\). Note that the variables \(x\) and \(y\) must both be strictly positive integers. This problem tests your knowledge of number theory and efficient searching techniques.

inputFormat

The input consists of a single positive integer \(N\) provided via standard input.

outputFormat

If a valid pair exists, output two integers \(x\) and \(y\) separated by a space via standard output. Otherwise, output \(-1\).

## sample
25
3 4

</p>