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


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x10(%rbp)
lea    0xeb3(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
movl   $0x2,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11b9 <main+0x89>
mov    -0xc(%rbp),%edi
call   1030 <check_prime@plt>
cmp    $0x1,%eax
jne    11a6 <main+0x76>
mov    -0x8(%rbp),%edi
sub    -0xc(%rbp),%edi
call   1030 <check_prime@plt>
cmp    $0x1,%eax
jne    11a6 <main+0x76>
lea    0xe6e(%rip),%rdi
call   1040 <printf@plt>
movl   $0x1,-0x10(%rbp)
jmp    11b9 <main+0x89>
jmp    11ab <main+0x7b>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    115d <main+0x2d>
cmpl   $0x0,-0x10(%rbp)
jne    11cf <main+0x9f>
lea    0xe3d(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%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>
lea    0xeb8(%rip),%r15
cmpl   $0x3,0x4(%rsp)
jl     119b <main+0x6b>
mov    $0x2,%ebp
mov    $0xfffffffe,%ebx
lea    0xe9c(%rip),%r14
jmp    117c <main+0x4c>
nopl   0x0(%rax)
add    $0x1,%ebp
add    $0xffffffff,%ebx
cmp    0x4(%rsp),%ebp
jge    119b <main+0x6b>
mov    %ebp,%edi
call   1030 <check_prime@plt>
cmp    $0x1,%eax
jne    1170 <main+0x40>
mov    0x4(%rsp),%edi
add    %ebx,%edi
call   1030 <check_prime@plt>
cmp    $0x1,%eax
jne    1170 <main+0x40>
mov    %r14,%r15
mov    %r15,%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
store i32 0, i32* %1
store i32 0, i32* %4
%5 = 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 %6
6: ; preds = %23, %0
%7 = load i32, i32* %3
%8 = load i32, i32* %2
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %26
10: ; preds = %6
%11 = load i32, i32* %3
%12 = call i32 @check_prime(i32 %11)
%13 = icmp eq i32 %12, 1
br i1 %13, label %14, label %22
14: ; preds = %10
%15 = load i32, i32* %2
%16 = load i32, i32* %3
%17 = sub nsw i32 %15, %16
%18 = call i32 @check_prime(i32 %17)
%19 = icmp eq i32 %18, 1
br i1 %19, label %20, label %22
20: ; preds = %14
%21 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
store i32 1, i32* %4
br label %26
22: ; preds = %14, %10
br label %23
23: ; preds = %22
%24 = load i32, i32* %3
%25 = add nsw i32 %24, 1
store i32 %25, i32* %3
br label %6
26: ; preds = %20, %6
%27 = load i32, i32* %4
%28 = icmp eq i32 %27, 0
br i1 %28, label %29, label %31
29: ; preds = %26
%30 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
br label %31
31: ; preds = %29, %26
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 %19
6: ; preds = %0, %15
%7 = phi i32 [ %16, %15 ], [ 2, %0 ]
%8 = call i32 @check_prime(i32 %7)
%9 = icmp eq i32 %8, 1
br i1 %9, label %10, label %15
10: ; preds = %6
%11 = load i32, i32* %1
%12 = sub nsw i32 %11, %7
%13 = call i32 @check_prime(i32 %12)
%14 = icmp eq i32 %13, 1
br i1 %14, label %19, label %15
15: ; preds = %6, %10
%16 = add nuw nsw i32 %7, 1
%17 = load i32, i32* %1
%18 = icmp slt i32 %16, %17
br i1 %18, label %6, label %19
19: ; preds = %15, %10, %0
%20 = phi i8* [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), %0 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), %10 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), %15 ]
%21 = call i32 @printf(i8* dereferenceable(1) %20)
ret i32 0
}