#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 /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int a;
  scanf("%d", &a);
  printf(a % 400 == 0 ? "Yes" : (a % 4 == 0 && a % 100 != 0 ? "Yes" : "No"));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    $0x190,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1163 <main+0x43>
lea    0xea9(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    11ac <main+0x8c>
mov    -0x8(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
xor    %eax,%eax
cmp    $0x0,%edx
mov    %al,-0x11(%rbp)
jne    1190 <main+0x70>
mov    -0x8(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%dl
lea    0xe6d(%rip),%rax
lea    0xe62(%rip),%rcx
test   $0x1,%dl
cmovne %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%ecx
imul   $0xc28f5c29,%ecx,%eax
add    $0x51eb850,%eax
mov    %eax,%edx
ror    $0x4,%edx
cmp    $0xa3d70b,%edx
jb     115c <main+0x3c>
test   $0x3,%cl
je     1165 <main+0x45>
lea    0xead(%rip),%rdi
jmp    117f <main+0x5f>
lea    0xea0(%rip),%rdi
jmp    117f <main+0x5f>
ror    $0x2,%eax
cmp    $0x28f5c29,%eax
lea    0xe93(%rip),%rax
lea    0xe88(%rip),%rdi
cmovb  %rax,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
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
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%4 = load i32, i32* %2
%5 = srem i32 %4, 400
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %0
br label %20
8: ; preds = %0
%9 = load i32, i32* %2
%10 = srem i32 %9, 4
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %16
12: ; preds = %8
%13 = load i32, i32* %2
%14 = srem i32 %13, 100
%15 = icmp ne i32 %14, 0
br label %16
16: ; preds = %12, %8
%17 = phi i1 [ false, %8 ], [ %15, %12 ]
%18 = zext i1 %17 to i64
%19 = select i1 %17, 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 = %16, %7
%21 = phi i8* [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), %7 ], [ %19, %16 ]
%22 = call i32 @printf(i8* %21)
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 = srem i32 %4, 400
%6 = icmp eq i32 %5, 0
br i1 %6, label %14, label %7
7: ; preds = %0
%8 = and i32 %4, 3
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %14
10: ; preds = %7
%11 = srem i32 %4, 100
%12 = icmp eq i32 %11, 0
%13 = select i1 %12, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0)
br label %14
14: ; preds = %7, %10, %0
%15 = phi i8* [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), %0 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), %7 ], [ %13, %10 ]
%16 = call i32 @printf(i8* dereferenceable(1) %15)
ret i32 0
}