fork download
  1. #include<stdio.h>
  2. #include<math.h>
  3.  
  4. int main(){
  5. long long n;
  6. while(true){
  7. scanf("%lld", &n);
  8. if (n == 0){
  9. break;
  10. }
  11. long long sq = sqrt(n);
  12. if (sq * sq == n){
  13. printf("yes\n");
  14. } else {
  15. printf("no\n");
  16. }
  17. }
  18. return 0;
  19. }
Success #stdin #stdout 0s 15232KB
stdin
3
6241
8191
0
stdout
no
yes
no