#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, check1, check2, x = 2, y = 0;
  scanf("%d", &n);
  while (x <= n - 2) {
    check1 = check_prime(x);
    check2 = check_prime(n - x);
    if (check1 == 1 && check2 == 1) {
      y = 1;
      printf("Yes");
      break;
    }
    x = x + 1;
  }
  if (y == 0)
    printf("No");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x2,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
lea    0xeac(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x14(%rbp),%eax
mov    -0x8(%rbp),%ecx
sub    $0x2,%ecx
cmp    %ecx,%eax
jg     11c1 <main+0x91>
mov    -0x14(%rbp),%edi
call   1030 <check_prime@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
sub    -0x14(%rbp),%edi
call   1030 <check_prime@plt>
mov    %eax,-0x10(%rbp)
cmpl   $0x1,-0xc(%rbp)
jne    11b3 <main+0x83>
cmpl   $0x1,-0x10(%rbp)
jne    11b3 <main+0x83>
movl   $0x1,-0x18(%rbp)
lea    0xe5a(%rip),%rdi
call   1040 <printf@plt>
jmp    11c1 <main+0x91>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    115d <main+0x2d>
cmpl   $0x0,-0x18(%rbp)
jne    11d7 <main+0xa7>
lea    0xe35(%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   %r12
push   %rbx
sub    $0x10,%rsp
lea    0xebd(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1050 <scanf@plt>
lea    0xeb3(%rip),%r14
cmpl   $0x4,0xc(%rsp)
jl     11a4 <main+0x74>
mov    $0x1,%ebp
mov    $0xfffffffe,%ebx
lea    0xe97(%rip),%r15
jmp    117e <main+0x4e>
xchg   %ax,%ax
mov    0xc(%rsp),%eax
add    $0xfffffffe,%eax
add    $0xffffffff,%ebx
cmp    %eax,%ebp
jge    11a4 <main+0x74>
add    $0x1,%ebp
mov    %ebp,%edi
call   1030 <check_prime@plt>
mov    %eax,%r12d
mov    0xc(%rsp),%edi
add    %ebx,%edi
call   1030 <check_prime@plt>
cmp    $0x1,%r12d
jne    1170 <main+0x40>
cmp    $0x1,%eax
jne    1170 <main+0x40>
mov    %r15,%r14
mov    %r14,%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r12
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
%6 = alloca i32
store i32 0, i32* %1
store i32 2, i32* %5
store i32 0, i32* %6
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
br label %8
8: ; preds = %27, %0
%9 = load i32, i32* %5
%10 = load i32, i32* %2
%11 = sub nsw i32 %10, 2
%12 = icmp sle i32 %9, %11
br i1 %12, label %13, label %30
13: ; preds = %8
%14 = load i32, i32* %5
%15 = call i32 @check_prime(i32 %14)
store i32 %15, i32* %3
%16 = load i32, i32* %2
%17 = load i32, i32* %5
%18 = sub nsw i32 %16, %17
%19 = call i32 @check_prime(i32 %18)
store i32 %19, i32* %4
%20 = load i32, i32* %3
%21 = icmp eq i32 %20, 1
br i1 %21, label %22, label %27
22: ; preds = %13
%23 = load i32, i32* %4
%24 = icmp eq i32 %23, 1
br i1 %24, label %25, label %27
25: ; preds = %22
store i32 1, i32* %6
%26 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
br label %30
27: ; preds = %22, %13
%28 = load i32, i32* %5
%29 = add nsw i32 %28, 1
store i32 %29, i32* %5
br label %8
30: ; preds = %25, %8
%31 = load i32, i32* %6
%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, 4
br i1 %5, label %20, label %11
6: ; preds = %11
%7 = add nuw nsw i32 %12, 1
%8 = load i32, i32* %1
%9 = add nsw i32 %8, -2
%10 = icmp slt i32 %12, %9
br i1 %10, label %11, label %20
11: ; preds = %0, %6
%12 = phi i32 [ %7, %6 ], [ 2, %0 ]
%13 = call i32 @check_prime(i32 %12)
%14 = load i32, i32* %1
%15 = sub nsw i32 %14, %12
%16 = call i32 @check_prime(i32 %15)
%17 = icmp eq i32 %13, 1
%18 = icmp eq i32 %16, 1
%19 = select i1 %17, i1 %18, i1 false
br i1 %19, label %20, label %6
20: ; preds = %6, %11, %0
%21 = 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), %11 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), %6 ]
%22 = call i32 @printf(i8* dereferenceable(1) %21)
ret i32 0
}