#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 *);
scalar_t__ sqrt(long long);
int main() {
  long long n, qn;
  while (scanf("%lld", &n) != EOF) {
    if (n == 0)
      break;
    qn = (long long)sqrt(n);
    if (qn * qn == n)
      printf("yes\n");
    else
      printf("no\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
mov    0x2e92(%rip),%rcx
cmp    (%rcx),%rax
je     11b1 <main+0x81>
cmpq   $0x0,-0x10(%rbp)
jne    116f <main+0x3f>
jmp    11b1 <main+0x81>
mov    -0x10(%rbp),%rdi
call   1050 <sqrt@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
imul   -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jne    11a0 <main+0x70>
lea    0xe6f(%rip),%rdi
call   1030 <printf@plt>
jmp    11ac <main+0x7c>
lea    0xe63(%rip),%rdi
call   1030 <printf@plt>
jmp    113f <main+0xf>
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    0xe9d(%rip),%r12
lea    0xe93(%rip),%r13
lea    0xe87(%rip),%r14
lea    0x8(%rsp),%rbx
xchg   %ax,%ax
call   1050 <sqrt@plt>
imul   %rax,%rax
mov    %r12,%rdi
cmp    0x8(%rsp),%rax
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 = [5 x i8] c"yes\0A\00"
@.str.2 = [4 x i8] c"no\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i64
store i32 0, i32* %1
br label %4
4: ; preds = %24, %0
%5 = call i64 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64* %2)
%6 = load i64, i64* @EOF
%7 = icmp ne i64 %5, %6
br i1 %7, label %8, label %25
8: ; preds = %4
%9 = load i64, i64* %2
%10 = icmp eq i64 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %8
br label %25
12: ; preds = %8
%13 = load i64, i64* %2
%14 = call i64 @sqrt(i64 %13)
store i64 %14, i64* %3
%15 = load i64, i64* %3
%16 = load i64, i64* %3
%17 = mul nsw i64 %15, %16
%18 = load i64, i64* %2
%19 = icmp eq i64 %17, %18
br i1 %19, label %20, label %22
20: ; preds = %12
%21 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
br label %24
22: ; preds = %12
%23 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
br label %24
24: ; preds = %22, %20
br label %4
25: ; preds = %11, %4
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"%lld\00"
@EOF = global i64 0
@str = [3 x i8] c"no\00"
@str.3 = [4 x i8] c"yes\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 %12, %13
%15 = select i1 %14, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.3, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @str, 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
}