#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 *);
int /*<<< orphan*/ scanf(char *, int *);
int main(int argc, char *argv[]) {
  int a, i;
  scanf("%i", &a);
  for (i = 2; i * i <= a; ++i) {
    if (!(a % i)) {
      printf("No");
      break;
    }
  }
  if (i * i > a)
    printf("Yes");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec3(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1040 <scanf@plt>
movl   $0x2,-0x18(%rbp)
mov    -0x18(%rbp),%eax
imul   -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     1191 <main+0x71>
mov    -0x14(%rbp),%eax
cltd
idivl  -0x18(%rbp)
cmp    $0x0,%edx
jne    117e <main+0x5e>
lea    0xe8f(%rip),%rdi
call   1030 <printf@plt>
jmp    1191 <main+0x71>
jmp    1183 <main+0x63>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    114d <main+0x2d>
mov    -0x18(%rbp),%eax
imul   -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jle    11ad <main+0x8d>
lea    0xe5e(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xed4(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1040 <scanf@plt>
mov    0xc(%rsp),%ecx
mov    $0x4,%ebx
cmp    $0x4,%ecx
jl     1185 <main+0x65>
mov    $0x4,%ebx
test   $0x1,%cl
je     1175 <main+0x55>
mov    $0x3,%esi
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %esi,%ebx
imul   %esi,%ebx
cmp    %ecx,%ebx
jg     1185 <main+0x65>
mov    %ecx,%eax
cltd
idiv   %esi
add    $0x1,%esi
test   %edx,%edx
jne    1160 <main+0x40>
lea    0xe87(%rip),%rdi
call   1030 <printf@plt>
mov    0xc(%rsp),%ecx
cmp    %ecx,%ebx
jle    1195 <main+0x75>
lea    0xe76(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%i\00"
@.str.1 = [3 x i8] c"No\00"
@.str.2 = [4 x i8] c"Yes\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %6)
store i32 2, i32* %7
br label %9
9: ; preds = %23, %2
%10 = load i32, i32* %7
%11 = load i32, i32* %7
%12 = mul nsw i32 %10, %11
%13 = load i32, i32* %6
%14 = icmp sle i32 %12, %13
br i1 %14, label %15, label %26
15: ; preds = %9
%16 = load i32, i32* %6
%17 = load i32, i32* %7
%18 = srem i32 %16, %17
%19 = icmp ne i32 %18, 0
br i1 %19, label %22, label %20
20: ; preds = %15
%21 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
br label %26
22: ; preds = %15
br label %23
23: ; preds = %22
%24 = load i32, i32* %7
%25 = add nsw i32 %24, 1
store i32 %25, i32* %7
br label %9
26: ; preds = %20, %9
%27 = load i32, i32* %7
%28 = load i32, i32* %7
%29 = mul nsw i32 %27, %28
%30 = load i32, i32* %6
%31 = icmp sgt i32 %29, %30
br i1 %31, label %32, label %34
32: ; preds = %26
%33 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
br label %34
34: ; preds = %32, %26
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%i\00"
@.str.1 = [3 x i8] c"No\00"
@.str.2 = [4 x i8] c"Yes\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%6 = load i32, i32* %3
%7 = icmp slt i32 %6, 4
br i1 %7, label %23, label %8
8: ; preds = %2
%9 = and i32 %6, 1
%10 = icmp eq i32 %9, 0
br i1 %10, label %19, label %11
11: ; preds = %8, %15
%12 = phi i32 [ %18, %15 ], [ 3, %8 ]
%13 = mul nsw i32 %12, %12
%14 = icmp sgt i32 %13, %6
br i1 %14, label %23, label %15
15: ; preds = %11
%16 = srem i32 %6, %12
%17 = icmp eq i32 %16, 0
%18 = add nuw nsw i32 %12, 1
br i1 %17, label %19, label %11
19: ; preds = %15, %8
%20 = phi i32 [ 4, %8 ], [ %13, %15 ]
%21 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%22 = load i32, i32* %3
br label %23
23: ; preds = %11, %2, %19
%24 = phi i32 [ %22, %19 ], [ %6, %2 ], [ %6, %11 ]
%25 = phi i32 [ %20, %19 ], [ 4, %2 ], [ %13, %11 ]
%26 = icmp sgt i32 %25, %24
br i1 %26, label %27, label %29
27: ; preds = %23
%28 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
br label %29
29: ; preds = %27, %23
ret i32 0
}