#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 */
int /*<<< orphan*/ printf(char *);
scalar_t__ scanf(char *, long *);
long sqrt(long);
int main() {
  long int n, i, root;
  while (scanf("%ld", &n) && n) {
    root = sqrt(n);
    if (n == root * root)
      printf("yes\n");
    else
      printf("no\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x21(%rbp)
je     116c <main+0x3c>
cmpq   $0x0,-0x10(%rbp)
setne  %al
mov    %al,-0x21(%rbp)
mov    -0x21(%rbp),%al
test   $0x1,%al
jne    117c <main+0x4c>
jmp    11c1 <main+0x91>
mov    -0x10(%rbp),%rdi
call   1050 <sqrt@plt>
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%rcx
imul   -0x20(%rbp),%rcx
cmp    %rcx,%rax
jne    11b0 <main+0x80>
lea    0xe5e(%rip),%rdi
call   1030 <printf@plt>
jmp    11bc <main+0x8c>
lea    0xe52(%rip),%rdi
call   1030 <printf@plt>
jmp    113f <main+0xf>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
lea    0xec1(%rip),%rdi
mov    %rsp,%rsi
call   1040 <scanf@plt>
test   %rax,%rax
je     11a3 <main+0x73>
mov    (%rsp),%rdi
test   %rdi,%rdi
je     11a3 <main+0x73>
lea    0xeab(%rip),%r15
lea    0xea1(%rip),%r12
lea    0xe96(%rip),%r14
mov    %rsp,%rbx
nopl   (%rax)
call   1050 <sqrt@plt>
imul   %rax,%rax
mov    %r15,%rdi
cmp    %rax,(%rsp)
je     1185 <main+0x55>
mov    %r12,%rdi
call   1030 <puts@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
test   %rax,%rax
je     11a3 <main+0x73>
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 = [4 x i8] c"%ld\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
%4 = alloca i64
store i32 0, i32* %1
br label %5
5: ; preds = %25, %0
%6 = call i64 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64* %2)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %5
%9 = load i64, i64* %2
%10 = icmp ne i64 %9, 0
br label %11
11: ; preds = %8, %5
%12 = phi i1 [ false, %5 ], [ %10, %8 ]
br i1 %12, label %13, label %26
13: ; preds = %11
%14 = load i64, i64* %2
%15 = call i64 @sqrt(i64 %14)
store i64 %15, i64* %4
%16 = load i64, i64* %2
%17 = load i64, i64* %4
%18 = load i64, i64* %4
%19 = mul nsw i64 %17, %18
%20 = icmp eq i64 %16, %19
br i1 %20, label %21, label %23
21: ; preds = %13
%22 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
br label %25
23: ; preds = %13
%24 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
br label %25
25: ; preds = %23, %21
br label %5
26: ; preds = %11
ret i32 0
}

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