#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 n, i, a, b;
  i = 2;
  scanf("%d", &n);
  while (n - 2 >= i) {
    a = check_prime(n - i);
    b = check_prime(i);
    if (a == 1 && b == 1) {
      printf("Yes");
    } else {
      i++;
    }
  }
  if (i == (n - 1))
    printf("No");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x2,-0xc(%rbp)
lea    0xeb3(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%eax
sub    $0x2,%eax
cmp    -0xc(%rbp),%eax
jl     11b1 <main+0x81>
mov    -0x8(%rbp),%edi
sub    -0xc(%rbp),%edi
call   1030 <check_prime@plt>
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <check_prime@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x1,-0x10(%rbp)
jne    11a3 <main+0x73>
cmpl   $0x1,-0x14(%rbp)
jne    11a3 <main+0x73>
lea    0xe6a(%rip),%rdi
call   1040 <printf@plt>
jmp    11ac <main+0x7c>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1156 <main+0x26>
mov    -0xc(%rbp),%eax
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jne    11ce <main+0x9e>
lea    0xe3e(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1050 <scanf@plt>
mov    0xc(%rsp),%edi
mov    $0x2,%ebx
cmp    $0x4,%edi
jge    1175 <main+0x45>
add    $0xffffffff,%edi
cmp    %edi,%ebx
jne    116a <main+0x3a>
lea    0xea2(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret
mov    $0x2,%ebx
lea    0xe82(%rip),%r14
jmp    119e <main+0x6e>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    $0x1,%ebx
mov    0xc(%rsp),%edi
lea    -0x2(%rdi),%eax
cmp    %ebx,%eax
jl     1157 <main+0x27>
sub    %ebx,%edi
call   1030 <check_prime@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   1030 <check_prime@plt>
cmp    $0x1,%ebp
jne    1190 <main+0x60>
cmp    $0x1,%eax
jne    1190 <main+0x60>
mov    %r14,%rdi
call   1040 <printf@plt>
jmp    1193 <main+0x63>

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
%5 = alloca i32
store i32 0, i32* %1
store i32 2, i32* %3
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
br label %7
7: ; preds = %29, %0
%8 = load i32, i32* %2
%9 = sub nsw i32 %8, 2
%10 = load i32, i32* %3
%11 = icmp sge i32 %9, %10
br i1 %11, label %12, label %30
12: ; preds = %7
%13 = load i32, i32* %2
%14 = load i32, i32* %3
%15 = sub nsw i32 %13, %14
%16 = call i32 @check_prime(i32 %15)
store i32 %16, i32* %4
%17 = load i32, i32* %3
%18 = call i32 @check_prime(i32 %17)
store i32 %18, i32* %5
%19 = load i32, i32* %4
%20 = icmp eq i32 %19, 1
br i1 %20, label %21, label %26
21: ; preds = %12
%22 = load i32, i32* %5
%23 = icmp eq i32 %22, 1
br i1 %23, label %24, label %26
24: ; preds = %21
%25 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
br label %29
26: ; preds = %21, %12
%27 = load i32, i32* %3
%28 = add nsw i32 %27, 1
store i32 %28, i32* %3
br label %29
29: ; preds = %26, %24
br label %7
30: ; preds = %7
%31 = load i32, i32* %3
%32 = load i32, i32* %2
%33 = sub nsw i32 %32, 1
%34 = icmp eq i32 %31, %33
br i1 %34, label %35, label %37
35: ; preds = %30
%36 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
br label %37
37: ; preds = %35, %30
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 slt i32 %4, 4
br i1 %5, label %24, label %6
6: ; preds = %0, %19
%7 = phi i32 [ %21, %19 ], [ %4, %0 ]
%8 = phi i32 [ %20, %19 ], [ 2, %0 ]
%9 = sub nsw i32 %7, %8
%10 = call i32 @check_prime(i32 %9)
%11 = call i32 @check_prime(i32 %8)
%12 = icmp eq i32 %10, 1
%13 = icmp eq i32 %11, 1
%14 = select i1 %12, i1 %13, i1 false
br i1 %14, label %15, label %17
15: ; preds = %6
%16 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
br label %19
17: ; preds = %6
%18 = add nsw i32 %8, 1
br label %19
19: ; preds = %17, %15
%20 = phi i32 [ %8, %15 ], [ %18, %17 ]
%21 = load i32, i32* %1
%22 = add nsw i32 %21, -2
%23 = icmp slt i32 %22, %20
br i1 %23, label %24, label %6
24: ; preds = %19, %0
%25 = phi i32 [ 2, %0 ], [ %20, %19 ]
%26 = phi i32 [ %4, %0 ], [ %21, %19 ]
%27 = add nsw i32 %26, -1
%28 = icmp eq i32 %25, %27
br i1 %28, label %29, label %31
29: ; preds = %24
%30 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
br label %31
31: ; preds = %29, %24
ret i32 0
}