Skip to content

Instantly share code, notes, and snippets.

@Trimad
Created December 9, 2017 21:17
Show Gist options
  • Save Trimad/da46e08b2c36913125d0e013991bfda0 to your computer and use it in GitHub Desktop.
Save Trimad/da46e08b2c36913125d0e013991bfda0 to your computer and use it in GitHub Desktop.
/* * * * * * * * *
* Tristan Madden
* 10/05/2017
* * * * * * * * */
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while (sc.hasNext()) {
boolean light = true;
long n = sc.nextLong();
if (n == 0) {
System.exit(0);
}
long a = Math.round(Math.sqrt(n));
if ((a * a) == n) {
light = true;
} else {
light = false;
}
if (light) {
System.out.println("yes");
} else {
System.out.println("no");
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment