#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 */
long long pow(long long, double);
int /*<<< orphan*/ printf(char *);
scalar_t__ scanf(char *, long long *);
int main(void) {
  long long int a, i;
  while (scanf("%lld", &a) && a != 0) {
    if (a == 1)
      printf("yes\n");
    else {
      i = pow(a, 1.0 / 2.0);
      if (i * i == a)
        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    0xec2(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x19(%rbp)
je     116c <main+0x3c>
cmpq   $0x0,-0x10(%rbp)
setne  %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
test   $0x1,%al
jne    117c <main+0x4c>
jmp    11e7 <main+0xb7>
cmpq   $0x1,-0x10(%rbp)
jne    1198 <main+0x68>
lea    0xe7f(%rip),%rdi
call   1030 <printf@plt>
jmp    11e2 <main+0xb2>
mov    -0x10(%rbp),%rdi
movsd  0xe5c(%rip),%xmm0
call   1050 <pow@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
imul   -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jne    11d1 <main+0xa1>
lea    0xe46(%rip),%rdi
call   1030 <printf@plt>
jmp    11dd <main+0xad>
lea    0xe3a(%rip),%rdi
call   1030 <printf@plt>
jmp    11e2 <main+0xb2>
jmp    113f <main+0xf>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
lea    0xec9(%rip),%rdi
mov    %rsp,%rsi
call   1040 <scanf@plt>
test   %rax,%rax
je     11b7 <main+0x87>
mov    (%rsp),%rdi
test   %rdi,%rdi
je     11b7 <main+0x87>
lea    0xeb4(%rip),%rbx
lea    0xea5(%rip),%r14
mov    %rsp,%r15
lea    0xea0(%rip),%r12
nopl   (%rax)
mov    %rbx,%rcx
cmp    $0x1,%rdi
je     1196 <main+0x66>
movsd  0xe7f(%rip),%xmm0
call   1050 <pow@plt>
imul   %rax,%rax
mov    %rbx,%rcx
cmp    (%rsp),%rax
je     1196 <main+0x66>
mov    %r12,%rcx
mov    %rcx,%rdi
call   1030 <puts@plt>
mov    %r14,%rdi
mov    %r15,%rsi
call   1040 <scanf@plt>
test   %rax,%rax
je     11b7 <main+0x87>
mov    (%rsp),%rdi
test   %rdi,%rdi
jne    1170 <main+0x40>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%lld\00"
@.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 = %30, %0
%5 = call i64 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64* %2)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %4
%8 = load i64, i64* %2
%9 = icmp ne i64 %8, 0
br label %10
10: ; preds = %7, %4
%11 = phi i1 [ false, %4 ], [ %9, %7 ]
br i1 %11, label %12, label %31
12: ; preds = %10
%13 = load i64, i64* %2
%14 = icmp eq i64 %13, 1
br i1 %14, label %15, label %17
15: ; preds = %12
%16 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
br label %30
17: ; preds = %12
%18 = load i64, i64* %2
%19 = call i64 @pow(i64 %18, double 5.000000e-01)
store i64 %19, i64* %3
%20 = load i64, i64* %3
%21 = load i64, i64* %3
%22 = mul nsw i64 %20, %21
%23 = load i64, i64* %2
%24 = icmp eq i64 %22, %23
br i1 %24, label %25, label %27
25: ; preds = %17
%26 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
br label %29
27: ; preds = %17
%28 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
br label %29
29: ; preds = %27, %25
br label %30
30: ; preds = %29, %15
br label %4
31: ; preds = %10
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"%lld\00"
@str = [3 x i8] c"no\00"
@str.4 = [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 = icmp ne i64 %3, 0
%5 = load i64, i64* %1
%6 = icmp ne i64 %5, 0
%7 = select i1 %4, i1 %6, i1 false
br i1 %7, label %8, label %25
8: ; preds = %0, %17
%9 = phi i64 [ %22, %17 ], [ %5, %0 ]
%10 = icmp eq i64 %9, 1
br i1 %10, label %17, label %11
11: ; preds = %8
%12 = call i64 @pow(i64 %9, double 5.000000e-01)
%13 = mul nsw i64 %12, %12
%14 = load i64, i64* %1
%15 = icmp eq i64 %13, %14
%16 = select i1 %15, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.4, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @str, i64 0, i64 0)
br label %17
17: ; preds = %11, %8
%18 = phi i8* [ getelementptr inbounds ([4 x i8], [4 x i8]* @str.4, i64 0, i64 0), %8 ], [ %16, %11 ]
%19 = call i32 @puts(i8* dereferenceable(1) %18)
%20 = call i64 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64* %1)
%21 = icmp ne i64 %20, 0
%22 = load i64, i64* %1
%23 = icmp ne i64 %22, 0
%24 = select i1 %21, i1 %23, i1 false
br i1 %24, label %8, label %25
25: ; preds = %17, %0
ret i32 0
}