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


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x10(%rbp)
lea    0xeb3(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1050 <scanf@plt>
movl   $0x2,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    11a1 <main+0x71>
mov    -0x8(%rbp),%edi
call   1030 <check_prime@plt>
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%edi
sub    -0x8(%rbp),%edi
call   1030 <check_prime@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%eax
imul   -0x14(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    115d <main+0x2d>
cmpl   $0x0,-0x10(%rbp)
jne    11bc <main+0x8c>
lea    0xe51(%rip),%rdi
call   1040 <printf@plt>
jmp    11c8 <main+0x98>
lea    0xe44(%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   $0x3,0x4(%rsp)
jl     118d <main+0x5d>
mov    $0x1,%r15d
mov    $0x2,%ebx
mov    $0xfffffffe,%ebp
nop
mov    %ebx,%edi
call   1030 <check_prime@plt>
mov    %eax,%r14d
mov    0x4(%rsp),%edi
add    %ebp,%edi
call   1030 <check_prime@plt>
add    %r14d,%eax
imul   %eax,%r15d
add    $0x1,%ebx
add    $0xffffffff,%ebp
cmp    0x4(%rsp),%ebx
jl     1160 <main+0x30>
test   %r15d,%r15d
je     1196 <main+0x66>
lea    0xe73(%rip),%rdi
jmp    119d <main+0x6d>
lea    0xe66(%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
store i32 1, i32* %4
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
store i32 2, i32* %2
br label %7
7: ; preds = %22, %0
%8 = load i32, i32* %2
%9 = load i32, i32* %3
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %25
11: ; preds = %7
%12 = load i32, i32* %2
%13 = call i32 @check_prime(i32 %12)
%14 = load i32, i32* %3
%15 = load i32, i32* %2
%16 = sub nsw i32 %14, %15
%17 = call i32 @check_prime(i32 %16)
%18 = add nsw i32 %13, %17
store i32 %18, i32* %5
%19 = load i32, i32* %4
%20 = load i32, i32* %5
%21 = mul nsw i32 %19, %20
store i32 %21, i32* %4
br label %22
22: ; preds = %11
%23 = load i32, i32* %2
%24 = add nsw i32 %23, 1
store i32 %24, i32* %2
br label %7
25: ; preds = %7
%26 = load i32, i32* %4
%27 = icmp eq i32 %26, 0
br i1 %27, label %28, label %30
28: ; preds = %25
%29 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
br label %32
30: ; preds = %25
%31 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
br label %32
32: ; preds = %30, %28
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 %20
6: ; preds = %0, %6
%7 = phi i32 [ %15, %6 ], [ 2, %0 ]
%8 = phi i32 [ %14, %6 ], [ 1, %0 ]
%9 = call i32 @check_prime(i32 %7)
%10 = load i32, i32* %1
%11 = sub nsw i32 %10, %7
%12 = call i32 @check_prime(i32 %11)
%13 = add nsw i32 %12, %9
%14 = mul nsw i32 %13, %8
%15 = add nuw nsw i32 %7, 1
%16 = load i32, i32* %1
%17 = icmp slt i32 %15, %16
br i1 %17, label %6, label %18
18: ; preds = %6
%19 = icmp eq i32 %14, 0
br i1 %19, label %21, label %20
20: ; preds = %0, %18
br label %21
21: ; preds = %18, %20
%22 = phi i8* [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), %20 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), %18 ]
%23 = call i32 @printf(i8* dereferenceable(1) %22)
ret i32 0
}