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


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%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    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x2,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
cmp    %ecx,%eax
jg     11d0 <main+0xa0>
mov    -0x10(%rbp),%edi
call   1030 <check_prime@plt>
cmp    $0x1,%eax
je     11bd <main+0x8d>
mov    -0x8(%rbp),%edi
sub    -0x10(%rbp),%edi
call   1030 <check_prime@plt>
cmp    $0x1,%eax
je     11bd <main+0x8d>
lea    0xe59(%rip),%rdi
call   1040 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11d0 <main+0xa0>
jmp    11c2 <main+0x92>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    115d <main+0x2d>
cmpl   $0x0,-0xc(%rbp)
jne    11e6 <main+0xb6>
lea    0xe26(%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>
lea    0xeb8(%rip),%r15
cmpl   $0x6,0x4(%rsp)
jl     11ac <main+0x7c>
mov    $0x1,%ebp
mov    $0xfffffffe,%ebx
lea    0xe9c(%rip),%r14
jmp    118a <main+0x5a>
nopl   0x0(%rax)
mov    0x4(%rsp),%eax
mov    %eax,%ecx
add    $0xfffffffe,%ecx
shr    $0x1f,%ecx
add    %ecx,%eax
add    $0xfffffffe,%eax
sar    %eax
add    $0xffffffff,%ebx
cmp    %eax,%ebp
jge    11ac <main+0x7c>
add    $0x1,%ebp
mov    %ebp,%edi
call   1030 <check_prime@plt>
cmp    $0x1,%eax
je     1170 <main+0x40>
mov    0x4(%rsp),%edi
add    %ebx,%edi
call   1030 <check_prime@plt>
cmp    $0x1,%eax
je     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* %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 = %27, %0
%7 = load i32, i32* %4
%8 = load i32, i32* %2
%9 = sub nsw i32 %8, 2
%10 = sdiv i32 %9, 2
%11 = icmp sle i32 %7, %10
br i1 %11, label %12, label %30
12: ; preds = %6
%13 = load i32, i32* %4
%14 = call i32 @check_prime(i32 %13)
%15 = icmp ne i32 %14, 1
br i1 %15, label %16, label %26
16: ; preds = %12
%17 = load i32, i32* %2
%18 = load i32, i32* %4
%19 = sub nsw i32 %17, %18
%20 = call i32 @check_prime(i32 %19)
%21 = icmp ne i32 %20, 1
br i1 %21, label %22, label %26
22: ; preds = %16
%23 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%24 = load i32, i32* %3
%25 = add nsw i32 %24, 1
store i32 %25, i32* %3
br label %30
26: ; preds = %16, %12
br label %27
27: ; preds = %26
%28 = load i32, i32* %4
%29 = add nsw i32 %28, 1
store i32 %29, i32* %4
br label %6
30: ; preds = %22, %6
%31 = load i32, i32* %3
%32 = icmp eq i32 %31, 0
br i1 %32, label %33, label %35
33: ; preds = %30
%34 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
br label %35
35: ; preds = %33, %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, 6
br i1 %5, label %21, label %6
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 %15, label %10
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 %15, label %21
15: ; preds = %6, %10
%16 = add nuw nsw i32 %7, 1
%17 = load i32, i32* %1
%18 = add nsw i32 %17, -2
%19 = sdiv i32 %18, 2
%20 = icmp slt i32 %7, %19
br i1 %20, label %6, label %21
21: ; preds = %15, %10, %0
%22 = 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 ]
%23 = call i32 @printf(i8* dereferenceable(1) %22)
ret i32 0
}