#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; i++) {
    chk1 = check_prime(i);
    chk2 = check_prime(num - i);
  }
  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
cmp    -0x8(%rbp),%eax
jge    1189 <main+0x59>
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)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1156 <main+0x26>
cmpl   $0x1,-0x10(%rbp)
jne    11ae <main+0x7e>
cmpl   $0x1,-0x14(%rbp)
jne    11ae <main+0x7e>
lea    0xe5f(%rip),%rdi
call   1040 <printf@plt>
jmp    11ba <main+0x8a>
lea    0xe52(%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>
cmpl   $0x3,0xc(%rsp)
jl     119f <main+0x6f>
mov    $0x2,%ebx
mov    $0xfffffffe,%ebp
nopw   0x0(%rax,%rax,1)
mov    %ebx,%edi
call   1030 <check_prime@plt>
mov    %eax,%r14d
mov    0xc(%rsp),%edi
add    %ebp,%edi
call   1030 <check_prime@plt>
add    $0x1,%ebx
add    $0xffffffff,%ebp
cmp    0xc(%rsp),%ebx
jl     1160 <main+0x30>
xor    $0x1,%r14d
xor    $0x1,%eax
lea    0xe74(%rip),%rcx
lea    0xe71(%rip),%rdi
or     %r14d,%eax
cmove  %rcx,%rdi
jmp    11a6 <main+0x76>
lea    0xe5d(%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
%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 = %18, %0
%8 = load i32, i32* %3
%9 = load i32, i32* %2
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %21
11: ; preds = %7
%12 = load i32, i32* %3
%13 = call i32 @check_prime(i32 %12)
store i32 %13, i32* %4
%14 = load i32, i32* %2
%15 = load i32, i32* %3
%16 = sub nsw i32 %14, %15
%17 = call i32 @check_prime(i32 %16)
store i32 %17, i32* %5
br label %18
18: ; preds = %11
%19 = load i32, i32* %3
%20 = add nsw i32 %19, 1
store i32 %20, i32* %3
br label %7
21: ; preds = %7
%22 = load i32, i32* %4
%23 = icmp eq i32 %22, 1
br i1 %23, label %24, label %29
24: ; preds = %21
%25 = load i32, i32* %5
%26 = icmp eq i32 %25, 1
br i1 %26, label %27, label %29
27: ; preds = %24
%28 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
br label %31
29: ; preds = %24, %21
%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, %27
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 [ %12, %6 ], [ 2, %0 ]
%8 = call i32 @check_prime(i32 %7)
%9 = load i32, i32* %1
%10 = sub nsw i32 %9, %7
%11 = call i32 @check_prime(i32 %10)
%12 = add nuw nsw i32 %7, 1
%13 = load i32, i32* %1
%14 = icmp slt i32 %12, %13
br i1 %14, label %6, label %15
15: ; preds = %6
%16 = icmp eq i32 %8, 1
%17 = icmp eq i32 %11, 1
%18 = select i1 %16, i1 %17, i1 false
%19 = select i1 %18, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0)
br label %20
20: ; preds = %15, %0
%21 = phi i8* [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), %0 ], [ %19, %15 ]
%22 = call i32 @printf(i8* dereferenceable(1) %21)
ret i32 0
}