#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
scalar_t__ EOF;
int /*<<< orphan*/ printf(char *);
scalar_t__ scanf(char *, long long *);
long long sqrt(long long);
int main() {
  long long int n, i, ans = 1;
  while (scanf("%lld", &n) != EOF) {
    if (n == 0)
      break;
    i = sqrt(n);
    i = i * i;
    if (n != i)
      printf("no\n");
    else
      printf("yes\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x1,-0x20(%rbp)
lea    0xeb2(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
mov    0x2e8a(%rip),%rcx
cmp    (%rcx),%rax
je     11c1 <main+0x91>
cmpq   $0x0,-0x10(%rbp)
jne    1177 <main+0x47>
jmp    11c1 <main+0x91>
mov    -0x10(%rbp),%rdi
call   1050 <sqrt@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
imul   -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
je     11b0 <main+0x80>
lea    0xe5f(%rip),%rdi
call   1030 <printf@plt>
jmp    11bc <main+0x8c>
lea    0xe52(%rip),%rdi
call   1030 <printf@plt>
jmp    1147 <main+0x17>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x10,%rsp
lea    0xebc(%rip),%rdi
lea    0x8(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x2e93(%rip),%r15
cmp    (%r15),%rax
je     11b5 <main+0x85>
mov    0x8(%rsp),%rdi
test   %rdi,%rdi
je     11b5 <main+0x85>
lea    0xe9a(%rip),%r12
lea    0xe97(%rip),%r13
lea    0xe87(%rip),%r14
lea    0x8(%rsp),%rbx
xchg   %ax,%ax
call   1050 <sqrt@plt>
imul   %rax,%rax
mov    %r12,%rdi
cmp    %rax,0x8(%rsp)
je     1196 <main+0x66>
mov    %r13,%rdi
call   1030 <puts@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
cmp    (%r15),%rax
je     11b5 <main+0x85>
mov    0x8(%rsp),%rdi
test   %rdi,%rdi
jne    1180 <main+0x50>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%lld\00"
@EOF = global i64 0
@.str.1 = [4 x i8] c"no\0A\00"
@.str.2 = [5 x i8] c"yes\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i64
%4 = alloca i64
store i32 0, i32* %1
store i64 1, i64* %4
br label %5
5: ; preds = %26, %0
%6 = call i64 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64* %2)
%7 = load i64, i64* @EOF
%8 = icmp ne i64 %6, %7
br i1 %8, label %9, label %27
9: ; preds = %5
%10 = load i64, i64* %2
%11 = icmp eq i64 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %9
br label %27
13: ; preds = %9
%14 = load i64, i64* %2
%15 = call i64 @sqrt(i64 %14)
store i64 %15, i64* %3
%16 = load i64, i64* %3
%17 = load i64, i64* %3
%18 = mul nsw i64 %16, %17
store i64 %18, i64* %3
%19 = load i64, i64* %2
%20 = load i64, i64* %3
%21 = icmp ne i64 %19, %20
br i1 %21, label %22, label %24
22: ; preds = %13
%23 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
br label %26
24: ; preds = %13
%25 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %26
26: ; preds = %24, %22
br label %5
27: ; preds = %12, %5
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"%lld\00"
@EOF = global i64 0
@str = [4 x i8] c"yes\00"
@str.3 = [3 x i8] c"no\00"
define i32 @main() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
%3 = call i64 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64* %1)
%4 = load i64, i64* @EOF
%5 = icmp eq i64 %3, %4
%6 = load i64, i64* %1
%7 = icmp eq i64 %6, 0
%8 = select i1 %5, i1 true, i1 %7
br i1 %8, label %23, label %9
9: ; preds = %0, %9
%10 = phi i64 [ %20, %9 ], [ %6, %0 ]
%11 = call i64 @sqrt(i64 %10)
%12 = mul nsw i64 %11, %11
%13 = load i64, i64* %1
%14 = icmp eq i64 %13, %12
%15 = select i1 %14, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @str.3, i64 0, i64 0)
%16 = call i32 @puts(i8* dereferenceable(1) %15)
%17 = call i64 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64* %1)
%18 = load i64, i64* @EOF
%19 = icmp eq i64 %17, %18
%20 = load i64, i64* %1
%21 = icmp eq i64 %20, 0
%22 = select i1 %19, i1 true, i1 %21
br i1 %22, label %23, label %9
23: ; preds = %9, %0
ret i32 0
}