Created
December 9, 2017 21:17
-
-
Save Trimad/da46e08b2c36913125d0e013991bfda0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* * * * * * * * * | |
* 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