#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 */
double ceil(double);
int /*<<< orphan*/ printf(char *);
int scanf(char *, unsigned int *);
double sqrt(unsigned int);
int main() {
  unsigned int l;
  double t;
  while (scanf("%ui", &l) == 1) {
    if (l == 0)
      break;
    t = sqrt(l);
    if (ceil(t) == t)
      printf("yes\n");
    else
      printf("no\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
cmp    $0x1,%eax
jne    11c1 <main+0x81>
cmpl   $0x0,-0x8(%rbp)
jne    1177 <main+0x37>
jmp    11c1 <main+0x81>
mov    -0x8(%rbp),%edi
call   1060 <sqrt@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1030 <ceil@plt>
ucomisd -0x10(%rbp),%xmm0
jne    11b0 <main+0x70>
jp     11b0 <main+0x70>
lea    0xe5e(%rip),%rdi
call   1040 <printf@plt>
jmp    11bc <main+0x7c>
lea    0xe52(%rip),%rdi
call   1040 <printf@plt>
jmp    114f <main+0xf>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x18,%rsp
lea    0xeae(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1050 <scanf@plt>
cmp    $0x1,%eax
jne    11ce <main+0x8e>
mov    0xc(%rsp),%edi
test   %edi,%edi
je     11ce <main+0x8e>
lea    0xe94(%rip),%rbx
lea    0xe90(%rip),%r12
lea    0xe82(%rip),%r14
lea    0xc(%rsp),%r15
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
call   1060 <sqrt@plt>
movsd  %xmm0,0x10(%rsp)
call   1040 <ceil@plt>
ucomisd 0x10(%rsp),%xmm0
mov    %r12,%rdi
cmovne %rbx,%rdi
cmovp  %rbx,%rdi
call   1030 <puts@plt>
mov    %r14,%rdi
mov    %r15,%rsi
call   1050 <scanf@plt>
cmp    $0x1,%eax
jne    11ce <main+0x8e>
mov    0xc(%rsp),%edi
test   %edi,%edi
jne    1190 <main+0x50>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%ui\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 i32
%3 = alloca double
store i32 0, i32* %1
br label %4
4: ; preds = %22, %0
%5 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %2)
%6 = icmp eq i32 %5, 1
br i1 %6, label %7, label %23
7: ; preds = %4
%8 = load i32, i32* %2
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %7
br label %23
11: ; preds = %7
%12 = load i32, i32* %2
%13 = call double @sqrt(i32 %12)
store double %13, double* %3
%14 = load double, double* %3
%15 = call double @llvm.ceil.f64(double %14)
%16 = load double, double* %3
%17 = fcmp oeq double %15, %16
br i1 %17, label %18, label %20
18: ; preds = %11
%19 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
br label %22
20: ; preds = %11
%21 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
br label %22
22: ; preds = %20, %18
br label %4
23: ; preds = %10, %4
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%ui\00"
@str = [3 x i8] c"no\00"
@str.3 = [4 x i8] c"yes\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = icmp ne i32 %3, 1
%5 = load i32, i32* %1
%6 = icmp eq i32 %5, 0
%7 = select i1 %4, i1 true, i1 %6
br i1 %7, label %20, label %8
8: ; preds = %0, %8
%9 = phi i32 [ %17, %8 ], [ %5, %0 ]
%10 = call double @sqrt(i32 %9)
%11 = call double @llvm.ceil.f64(double %10)
%12 = fcmp oeq double %11, %10
%13 = select i1 %12, 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)
%14 = call i32 @puts(i8* dereferenceable(1) %13)
%15 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %1)
%16 = icmp ne i32 %15, 1
%17 = load i32, i32* %1
%18 = icmp eq i32 %17, 0
%19 = select i1 %16, i1 true, i1 %18
br i1 %19, label %20, label %8
20: ; preds = %8, %0
ret i32 0
}