#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");
      break;
    } 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    11b1 <main+0x81>
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,%eax
cmp    $0x4,%edi
jl     11b1 <main+0x81>
mov    $0x2,%ebx
mov    $0xfffffffe,%ebp
jmp    1183 <main+0x53>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
lea    0x1(%rbx),%eax
mov    0xc(%rsp),%edi
lea    -0x2(%rdi),%ecx
add    $0xffffffff,%ebp
cmp    %ebx,%ecx
mov    %eax,%ebx
jle    11b1 <main+0x81>
add    %ebp,%edi
call   1030 <check_prime@plt>
mov    %eax,%r14d
mov    %ebx,%edi
call   1030 <check_prime@plt>
cmp    $0x1,%r14d
jne    1170 <main+0x40>
cmp    $0x1,%eax
jne    1170 <main+0x40>
lea    0xe5d(%rip),%rdi
call   1040 <printf@plt>
mov    0xc(%rsp),%edi
mov    %ebx,%eax
add    $0xffffffff,%edi
cmp    %edi,%eax
jne    11c4 <main+0x94>
lea    0xe48(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
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
%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 %30
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
br label %7
30: ; preds = %24, %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 %23, label %6
6: ; preds = %0, %18
%7 = phi i32 [ %20, %18 ], [ %4, %0 ]
%8 = phi i32 [ %19, %18 ], [ 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 %18
15: ; preds = %6
%16 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%17 = load i32, i32* %1
br label %23
18: ; preds = %6
%19 = add nuw nsw i32 %8, 1
%20 = load i32, i32* %1
%21 = add nsw i32 %20, -2
%22 = icmp sgt i32 %21, %8
br i1 %22, label %6, label %23
23: ; preds = %18, %0, %15
%24 = phi i32 [ %17, %15 ], [ %4, %0 ], [ %20, %18 ]
%25 = phi i32 [ %8, %15 ], [ 2, %0 ], [ %19, %18 ]
%26 = add nsw i32 %24, -1
%27 = icmp eq i32 %25, %26
br i1 %27, label %28, label %30
28: ; preds = %23
%29 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
br label %30
30: ; preds = %28, %23
ret i32 0
}