import java.util.Scanner;
class test21 {
public static void main(String[] args) {
Scanner input=new Scanner(System.in);
int n=input.nextInt();
input.close();
int flag=0;
for (int x=1;x<=100;x++){
for(int y=x;y<=100;y++){
if(x*x+y*y==n){
flag=1;
System.out.println(x+" "+y);
}
}
}
if(flag<1){
System.out.println("No Solution");
}
}
}