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


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
lea    0xeb3(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
movl   $0x2,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    -0x8(%rbp),%ecx
sub    $0x2,%ecx
cmp    %ecx,%eax
jg     11b2 <main+0x82>
mov    -0x10(%rbp),%edi
call   1030 <check_prime@plt>
cmp    $0x1,%eax
jne    119f <main+0x6f>
mov    -0x8(%rbp),%edi
sub    -0x10(%rbp),%edi
call   1030 <check_prime@plt>
cmp    $0x1,%eax
jne    119a <main+0x6a>
movl   $0x1,-0xc(%rbp)
jmp    119f <main+0x6f>
jmp    11a4 <main+0x74>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    115d <main+0x2d>
cmpl   $0x0,-0xc(%rbp)
je     11cd <main+0x9d>
lea    0xe40(%rip),%rdi
call   1040 <printf@plt>
jmp    11d9 <main+0xa9>
lea    0xe33(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%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>
cmpl   $0x4,0xc(%rsp)
jl     119f <main+0x6f>
xor    %r14d,%r14d
mov    $0x1,%ebx
mov    $0xfffffffe,%ebp
jmp    116e <main+0x3e>
nop
mov    0xc(%rsp),%eax
add    $0xfffffffe,%eax
add    $0xffffffff,%ebp
cmp    %eax,%ebx
jge    1191 <main+0x61>
add    $0x1,%ebx
mov    %ebx,%edi
call   1030 <check_prime@plt>
cmp    $0x1,%eax
jne    1160 <main+0x30>
mov    0xc(%rsp),%edi
add    %ebp,%edi
call   1030 <check_prime@plt>
cmp    $0x1,%eax
cmove  %eax,%r14d
jmp    1160 <main+0x30>
test   %r14d,%r14d
je     119f <main+0x6f>
lea    0xe66(%rip),%rdi
jmp    11a6 <main+0x76>
lea    0xe61(%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
store i32 0, i32* %1
store i32 0, i32* %3
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
store i32 2, i32* %4
br label %6
6: ; preds = %24, %0
%7 = load i32, i32* %4
%8 = load i32, i32* %2
%9 = sub nsw i32 %8, 2
%10 = icmp sle i32 %7, %9
br i1 %10, label %11, label %27
11: ; preds = %6
%12 = load i32, i32* %4
%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* %4
%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 %22
21: ; preds = %15
store i32 1, i32* %3
br label %22
22: ; preds = %21, %15
br label %23
23: ; preds = %22, %11
br label %24
24: ; preds = %23
%25 = load i32, i32* %4
%26 = add nsw i32 %25, 1
store i32 %26, i32* %4
br label %6
27: ; preds = %6
%28 = load i32, i32* %3
%29 = icmp ne i32 %28, 0
br i1 %29, label %30, label %32
30: ; preds = %27
%31 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
br label %34
32: ; preds = %27
%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, %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 %25, label %6
6: ; preds = %0, %17
%7 = phi i32 [ %19, %17 ], [ 2, %0 ]
%8 = phi i32 [ %18, %17 ], [ 0, %0 ]
%9 = call i32 @check_prime(i32 %7)
%10 = icmp eq i32 %9, 1
br i1 %10, label %11, label %17
11: ; preds = %6
%12 = load i32, i32* %1
%13 = sub nsw i32 %12, %7
%14 = call i32 @check_prime(i32 %13)
%15 = icmp eq i32 %14, 1
%16 = select i1 %15, i32 1, i32 %8
br label %17
17: ; preds = %11, %6
%18 = phi i32 [ %8, %6 ], [ %16, %11 ]
%19 = add nuw nsw i32 %7, 1
%20 = load i32, i32* %1
%21 = add nsw i32 %20, -2
%22 = icmp slt i32 %7, %21
br i1 %22, label %6, label %23
23: ; preds = %17
%24 = icmp eq i32 %18, 0
br i1 %24, label %25, label %26
25: ; preds = %0, %23
br label %26
26: ; preds = %23, %25
%27 = phi i8* [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), %25 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), %23 ]
%28 = call i32 @printf(i8* dereferenceable(1) %27)
ret i32 0
}