#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 check_prime(int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int p, i = 2, flag = 0;
  scanf("%d", &p);
  for (i; i < p; i++) {
    if ((check_prime(i) == 1) && (check_prime(p - i) == 1)) {
      printf("Yes");
      break;
    }
    flag = flag + 1;
  }
  if (flag > 0)
    printf("No");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x2,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
lea    0xeac(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11b6 <main+0x86>
mov    -0xc(%rbp),%edi
call   1030 <check_prime@plt>
cmp    $0x1,%eax
jne    119f <main+0x6f>
mov    -0x8(%rbp),%edi
sub    -0xc(%rbp),%edi
call   1030 <check_prime@plt>
cmp    $0x1,%eax
jne    119f <main+0x6f>
lea    0xe6e(%rip),%rdi
call   1040 <printf@plt>
jmp    11b6 <main+0x86>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    115d <main+0x2d>
cmpl   $0x0,-0x10(%rbp)
jle    11cc <main+0x9c>
lea    0xe40(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
lea    0xec6(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
cmpl   $0x3,0x4(%rsp)
jl     11a5 <main+0x75>
mov    $0x2,%ebx
mov    $0xfffffffe,%ebp
jmp    116c <main+0x3c>
nopw   0x0(%rax,%rax,1)
add    $0x1,%ebx
add    $0xffffffff,%ebp
cmp    0x4(%rsp),%ebx
jge    1199 <main+0x69>
mov    %ebx,%edi
call   1030 <check_prime@plt>
cmp    $0x1,%eax
jne    1160 <main+0x30>
mov    0x4(%rsp),%edi
add    %ebp,%edi
call   1030 <check_prime@plt>
cmp    $0x1,%eax
jne    1160 <main+0x30>
lea    0xe74(%rip),%rdi
call   1040 <printf@plt>
cmp    $0xfffffffe,%ebp
je     11a5 <main+0x75>
lea    0xe67(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

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