import java.util.Scanner;
public class Main {
public static void main(String args[]) {
Scanner scn = new Scanner(System.in);
int n=scn.nextInt(),count=0;
for(int i=1;i<1000000000&&n>0;i++) {
if(count==1)
break;
for(int j=1;j<i;j++) {
if(i*i==j*j+n*n||j*j==n*n+i*i||n*n==i*i+j*j) {
System.out.println(j+" "+i);
count++;
}
}
}
if(count==-1)
System.out.print(-1);
}
}
Whats wrong in the code?