1.
import java.io.BufferedReader;
import java.io.InputStreamReader;

/**
* Angewandte Mathematik, SS11
* Problem: 10110 Light, More Light
* Link: http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=117&page=show_problem&problem=2834
*
* @author Gent Selmanaj
* @author Marco Schuster
* @version 1.0, 2011-03-22
*
* Method :
* Status : Accept (Submission ID 8690273)
* Runtime: 0.988
*/
public class Main {

/**
* @param args
*/
public static void main(String[] args) {
try {
BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
long numLamps;
numLamps = Long.parseLong(input.readLine());
while(numLamps!=0) {
long a=(long) Math.sqrt(numLamps);
double b=Math.sqrt(numLamps);
if(a==b)
System.out.println("yes");
else
System.out.println("no");
numLamps = Long.parseLong(input.readLine());
}
} catch(Exception e) {
e.printStackTrace();
}
}
}




---------------------------------------------------------------------------------------------
1.
/**
 *
 * Problem #10110- Light, more light
 *
 *
 * @author Mariya Vlaseva
 *
 * Status : Accepted
 * Runtime: 1.016
 */


package ACM;

import java.io.*;

public class Main {

    public static void main(String... args) throws IOException {
        // Zeilen auslesen
        BufferedReader console = new BufferedReader(new InputStreamReader(System.in));
       
        long schalter, schritte;
       
        //solange auslesen, bis eine 0 eingegeben wird
        for (String line=console.readLine();!line.equals("0"); line=console.readLine()){
        //while((schalter=Long.parseLong(console.readLine()))!=0){
            schalter=Long.parseLong(line);
           
            schritte= (long)Math.pow(Math.floor(Math.sqrt(schalter)),2);
           
            if (schritte==schalter){
                System.out.println("yes");
            }
            else{
                System.out.println("no");
            }
           
        }

    }

}


2.
/**
* FWP: Ausgewaehlte Probleme aus dem ACM (SS10)
*
* Method: Math
* Problem: 10110 - LightMoreLight
* Accepted: 0.904
* @author Evgeni Pavlidis
*
*/
import java.io.*;
import java.util.*;
import java.math.*;

class Main {

public static void main(String...args) throws Exception
{
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
long n, i;


while( (n = Long.parseLong(reader.readLine())) != 0)
{
i = (long)Math.pow(Math.floor( Math.sqrt(n) ),2);

if(n == i)
System.out.println("yes");
else
System.out.println("no");
}
}
}