Problem
My Solution
1import java.util.Scanner;
2
3public class Main {
4
5 public static void main(String[] args) {
6
7 Scanner sc = new Scanner(System.in);
8
9 while (sc.hasNext()) {
10
11 boolean light = true;
12 long n = sc.nextLong();
13
14 if (n == 0) {
15 System.exit(0);
16 }
17
18 long a = Math.round(Math.sqrt(n));
19
20 if ((a * a) == n) {
21 light = true;
22 } else {
23 light = false;
24 }
25
26 if (light) {
27 System.out.println("yes");
28 } else {
29 System.out.println("no");
30 }
31
32 }
33 }
34}