Works for all test cases. Don't know why it WAs. Some help from them JAVA people would be nice.
[java]import java.io.*;
import java.lang.*;
class Main
{
public static void main(String args[])
{
StringBuffer B;
String S;
int N,Length,i;
char c;
while(true)
{
try
{
B=new StringBuffer();
while((c=(char)System.in.read())!='\n'&&c!=-1)
B.append(c);
}
catch(IOException e)
{
break;
}
S=B.toString();
N = Integer.parseInt(S.substring(0,S.length()-1));
if(N==0||c==-1)
break;
if(Math.pow(Math.floor(Math.sqrt(N)),2)==N)
System.out.println("yes");
else
System.out.println("no");
}
}
};[/java]
