#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 num, i;
  scanf("%d", &num);
  int chk1, chk2;
  for (i = 2; i <= (num - 2); i++) {
    chk1 = check_prime(i);
    chk2 = check_prime(num - i);
    if ((chk1 == 1) && (chk2 == 1))
      break;
  }
  if ((chk1 == 1) && (chk2 == 1)) {
    printf("Yes");
  } else {
    printf("No");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
movl   $0x2,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x8(%rbp),%ecx
sub    $0x2,%ecx
cmp    %ecx,%eax
jg     11ac <main+0x7c>
mov    -0xc(%rbp),%edi
call   1030 <check_prime@plt>
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%edi
sub    -0xc(%rbp),%edi
call   1030 <check_prime@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x1,-0x10(%rbp)
jne    1199 <main+0x69>
cmpl   $0x1,-0x14(%rbp)
jne    1199 <main+0x69>
jmp    11ac <main+0x7c>
jmp    119e <main+0x6e>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1156 <main+0x26>
cmpl   $0x1,-0x10(%rbp)
jne    11d1 <main+0xa1>
cmpl   $0x1,-0x14(%rbp)
jne    11d1 <main+0xa1>
lea    0xe3c(%rip),%rdi
call   1040 <printf@plt>
jmp    11dd <main+0xad>
lea    0xe2f(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
lea    0xec2(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
cmpl   $0x4,0x4(%rsp)
jl     11c5 <main+0x95>
mov    $0x1,%r14d
mov    $0xfffffffe,%ebp
mov    $0x1,%ebx
jmp    117e <main+0x4e>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    0x4(%rsp),%ecx
add    $0xfffffffe,%ecx
add    $0xffffffff,%ebp
cmp    %ecx,%ebx
jge    11ae <main+0x7e>
add    $0x1,%ebx
mov    %ebx,%edi
call   1030 <check_prime@plt>
mov    %eax,%r15d
mov    0x4(%rsp),%edi
add    %ebp,%edi
call   1030 <check_prime@plt>
cmp    $0x1,%r15d
jne    1170 <main+0x40>
cmp    $0x1,%eax
jne    1170 <main+0x40>
mov    $0x1,%eax
cmp    $0x1,%r14d
je     11b7 <main+0x87>
jmp    11c5 <main+0x95>
mov    %r15d,%r14d
cmp    $0x1,%r14d
jne    11c5 <main+0x95>
cmp    $0x1,%eax
jne    11c5 <main+0x95>
lea    0xe40(%rip),%rdi
jmp    11cc <main+0x9c>
lea    0xe3b(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
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
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
store i32 2, i32* %3
br label %7
7: ; preds = %26, %0
%8 = load i32, i32* %3
%9 = load i32, i32* %2
%10 = sub nsw i32 %9, 2
%11 = icmp sle i32 %8, %10
br i1 %11, label %12, label %29
12: ; preds = %7
%13 = load i32, i32* %3
%14 = call i32 @check_prime(i32 %13)
store i32 %14, i32* %4
%15 = load i32, i32* %2
%16 = load i32, i32* %3
%17 = sub nsw i32 %15, %16
%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 %25
21: ; preds = %12
%22 = load i32, i32* %5
%23 = icmp eq i32 %22, 1
br i1 %23, label %24, label %25
24: ; preds = %21
br label %29
25: ; preds = %21, %12
br label %26
26: ; preds = %25
%27 = load i32, i32* %3
%28 = add nsw i32 %27, 1
store i32 %28, i32* %3
br label %7
29: ; preds = %24, %7
%30 = load i32, i32* %4
%31 = icmp eq i32 %30, 1
br i1 %31, label %32, label %37
32: ; preds = %29
%33 = load i32, i32* %5
%34 = icmp eq i32 %33, 1
br i1 %34, label %35, label %37
35: ; preds = %32
%36 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
br label %39
37: ; preds = %32, %29
%38 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
br label %39
39: ; preds = %37, %35
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 %26, label %11
6: ; preds = %11
%7 = add nuw nsw i32 %12, 1
%8 = load i32, i32* %1
%9 = add nsw i32 %8, -2
%10 = icmp slt i32 %12, %9
br i1 %10, label %11, label %20
11: ; preds = %0, %6
%12 = phi i32 [ %7, %6 ], [ 2, %0 ]
%13 = call i32 @check_prime(i32 %12)
%14 = load i32, i32* %1
%15 = sub nsw i32 %14, %12
%16 = call i32 @check_prime(i32 %15)
%17 = icmp eq i32 %13, 1
%18 = icmp eq i32 %16, 1
%19 = select i1 %17, i1 %18, i1 false
br i1 %19, label %20, label %6
20: ; preds = %6, %11
%21 = phi i32 [ %13, %6 ], [ 1, %11 ]
%22 = phi i32 [ %16, %6 ], [ 1, %11 ]
%23 = icmp eq i32 %21, 1
%24 = icmp eq i32 %22, 1
%25 = select i1 %23, i1 %24, i1 false
br i1 %25, label %27, label %26
26: ; preds = %0, %20
br label %27
27: ; preds = %20, %26
%28 = phi i8* [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), %26 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), %20 ]
%29 = call i32 @printf(i8* dereferenceable(1) %28)
ret i32 0
}