#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 *, int *);
int main() {
  int n, k, i;
  while (scanf("%d", &n) != EOF) {
    if (n == 0)
      return 0;
    k = 0;
    for (i = 2; i * i < n; i++)
      if (n % (i * i) == 0)
        k = 1;
    if (k)
      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    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    0x2ea2(%rip),%rcx
cmp    (%rcx),%rax
je     11df <main+0xbf>
cmpl   $0x0,-0x8(%rbp)
jne    1165 <main+0x45>
movl   $0x0,-0x4(%rbp)
jmp    11e6 <main+0xc6>
movl   $0x0,-0xc(%rbp)
movl   $0x2,-0x10(%rbp)
mov    -0x10(%rbp),%eax
imul   -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11b3 <main+0x93>
mov    -0x8(%rbp),%eax
mov    -0x10(%rbp),%ecx
imul   -0x10(%rbp),%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    11a0 <main+0x80>
movl   $0x1,-0xc(%rbp)
jmp    11a5 <main+0x85>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1173 <main+0x53>
cmpl   $0x0,-0xc(%rbp)
je     11ce <main+0xae>
lea    0xe3f(%rip),%rdi
call   1030 <printf@plt>
jmp    11da <main+0xba>
lea    0xe33(%rip),%rdi
call   1030 <printf@plt>
jmp    112f <main+0xf>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
lea    0xece(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x2ea5(%rip),%r15
cmp    (%r15),%rax
je     11d1 <main+0xb1>
mov    0x4(%rsp),%ecx
test   %ecx,%ecx
je     11d1 <main+0xb1>
mov    $0x1,%ebp
lea    0xe9f(%rip),%r13
lea    0xe95(%rip),%r14
lea    0x4(%rsp),%r12
cmp    $0x5,%ecx
jl     11b1 <main+0x91>
xor    %esi,%esi
mov    $0x4,%edi
mov    $0x3,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %ecx,%eax
cltd
idiv   %edi
test   %edx,%edx
cmove  %ebp,%esi
mov    %ebx,%edi
imul   %ebx,%edi
add    $0x1,%ebx
cmp    %ecx,%edi
jl     1190 <main+0x70>
lea    0xe59(%rip),%rdi
test   %esi,%esi
jne    11b4 <main+0x94>
mov    %r13,%rdi
call   1030 <puts@plt>
mov    %r14,%rdi
mov    %r12,%rsi
call   1040 <scanf@plt>
cmp    (%r15),%rax
je     11d1 <main+0xb1>
mov    0x4(%rsp),%ecx
test   %ecx,%ecx
jne    1170 <main+0x50>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\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 i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
br label %5
5: ; preds = %39, %0
%6 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%7 = load i64, i64* @EOF
%8 = icmp ne i64 %6, %7
br i1 %8, label %9, label %40
9: ; preds = %5
%10 = load i32, i32* %2
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %9
store i32 0, i32* %1
br label %41
13: ; preds = %9
store i32 0, i32* %3
store i32 2, i32* %4
br label %14
14: ; preds = %29, %13
%15 = load i32, i32* %4
%16 = load i32, i32* %4
%17 = mul nsw i32 %15, %16
%18 = load i32, i32* %2
%19 = icmp slt i32 %17, %18
br i1 %19, label %20, label %32
20: ; preds = %14
%21 = load i32, i32* %2
%22 = load i32, i32* %4
%23 = load i32, i32* %4
%24 = mul nsw i32 %22, %23
%25 = srem i32 %21, %24
%26 = icmp eq i32 %25, 0
br i1 %26, label %27, label %28
27: ; preds = %20
store i32 1, i32* %3
br label %28
28: ; preds = %27, %20
br label %29
29: ; preds = %28
%30 = load i32, i32* %4
%31 = add nsw i32 %30, 1
store i32 %31, i32* %4
br label %14
32: ; preds = %14
%33 = load i32, i32* %3
%34 = icmp ne i32 %33, 0
br i1 %34, label %35, label %37
35: ; preds = %32
%36 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
br label %39
37: ; preds = %32
%38 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
br label %39
39: ; preds = %37, %35
br label %5
40: ; preds = %5
store i32 0, i32* %1
br label %41
41: ; preds = %40, %12
%42 = load i32, i32* %1
ret i32 %42
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\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 i32
%2 = bitcast i32* %1 to i8*
%3 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i64, i64* @EOF
%5 = icmp eq i64 %3, %4
%6 = load i32, i32* %1
%7 = icmp eq i32 %6, 0
%8 = select i1 %5, i1 true, i1 %7
br i1 %8, label %34, label %9
9: ; preds = %0, %25
%10 = phi i32 [ %31, %25 ], [ %6, %0 ]
%11 = icmp sgt i32 %10, 4
br i1 %11, label %12, label %24
12: ; preds = %9, %12
%13 = phi i32 [ %20, %12 ], [ 4, %9 ]
%14 = phi i32 [ %19, %12 ], [ 2, %9 ]
%15 = phi i32 [ %18, %12 ], [ 0, %9 ]
%16 = srem i32 %10, %13
%17 = icmp eq i32 %16, 0
%18 = select i1 %17, i32 1, i32 %15
%19 = add nuw nsw i32 %14, 1
%20 = mul nsw i32 %19, %19
%21 = icmp slt i32 %20, %10
br i1 %21, label %12, label %22
22: ; preds = %12
%23 = icmp eq i32 %18, 0
br i1 %23, label %24, label %25
24: ; preds = %9, %22
br label %25
25: ; preds = %22, %24
%26 = phi i8* [ getelementptr inbounds ([3 x i8], [3 x i8]* @str, i64 0, i64 0), %24 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @str.3, i64 0, i64 0), %22 ]
%27 = call i32 @puts(i8* dereferenceable(1) %26)
%28 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%29 = load i64, i64* @EOF
%30 = icmp eq i64 %28, %29
%31 = load i32, i32* %1
%32 = icmp eq i32 %31, 0
%33 = select i1 %30, i1 true, i1 %32
br i1 %33, label %34, label %9
34: ; preds = %25, %0
ret i32 0
}