74 = 7 +  52

Input

74


Output

"YES"


 Solution


import java.util.*;
class TestClass {
public static void main(String args[] ) throws Exception {
Scanner kb=new Scanner(System.in);
int n,i,j,p=0;
n=kb.nextInt();
ab: for(i=1;i<31;i++)
{for(j=1;j<31;j++)
{
if((i*i+j*j)==n)
{p=1;
break ab;
}
}
}
if(p==1)
System.out.println("YES");
else
System.out.println("NO");
}
}



if you have any problem in this code, take a screen shot and contact with Rishabh Chaubey.
Previous Post Next Post