#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 *, long long *);
int main() {
  long long int a;
  scanf("%lld", &a);
  long long int b = a % 6;
  if (b == 0)
    printf("yes\n");
  else if (b == 1)
    printf("yes\n");
  else if (b == 3)
    printf("yes\n");
  else
    printf("no\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x10(%rbp),%rax
mov    $0x6,%ecx
cqto
idiv   %rcx
mov    %rdx,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    116d <main+0x4d>
lea    0xea2(%rip),%rdi
call   1030 <printf@plt>
jmp    11bb <main+0x9b>
cmpq   $0x1,-0x18(%rbp)
jne    1189 <main+0x69>
lea    0xe86(%rip),%rdi
call   1030 <printf@plt>
jmp    11b6 <main+0x96>
cmpq   $0x3,-0x18(%rbp)
jne    11a5 <main+0x85>
lea    0xe6a(%rip),%rdi
call   1030 <printf@plt>
jmp    11b1 <main+0x91>
lea    0xe5e(%rip),%rdi
call   1030 <printf@plt>
jmp    11b6 <main+0x96>
jmp    11bb <main+0x9b>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
mov    %rsp,%rsi
call   1040 <scanf@plt>
mov    (%rsp),%rcx
movabs $0x2aaaaaaaaaaaaaab,%rdx
aa aa 2a
mov    %rcx,%rax
imul   %rdx
mov    %rdx,%rax
shr    $0x3f,%rax
add    %rdx,%rax
add    %rax,%rax
lea    (%rax,%rax,2),%rax
sub    %rax,%rcx
cmp    $0x3,%rcx
ja     116e <main+0x4e>
lea    0xea7(%rip),%rax
movslq (%rax,%rcx,4),%rdi
add    %rax,%rdi
jmp    1175 <main+0x55>
lea    0xe90(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%lld\00"
@.str.1 = [5 x i8] c"yes\0A\00"
@.str.2 = [4 x i8] c"no\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i64
store i32 0, i32* %1
%4 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64* %2)
%5 = load i64, i64* %2
%6 = srem i64 %5, 6
store i64 %6, i64* %3
%7 = load i64, i64* %3
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %0
%10 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
br label %25
11: ; preds = %0
%12 = load i64, i64* %3
%13 = icmp eq i64 %12, 1
br i1 %13, label %14, label %16
14: ; preds = %11
%15 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
br label %24
16: ; preds = %11
%17 = load i64, i64* %3
%18 = icmp eq i64 %17, 3
br i1 %18, label %19, label %21
19: ; preds = %16
%20 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
br label %23
21: ; preds = %16
%22 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
br label %23
23: ; preds = %21, %19
br label %24
24: ; preds = %23, %14
br label %25
25: ; preds = %24, %9
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"%lld\00"
@str = [3 x i8] c"no\00"
@str.5 = [4 x i8] c"yes\00"
@reltable.main = [4 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([4 x i8]* @str.5 to i64), i64 ptrtoint ([4 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([4 x i8]* @str.5 to i64), i64 ptrtoint ([4 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @str to i64), i64 ptrtoint ([4 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([4 x i8]* @str.5 to i64), i64 ptrtoint ([4 x i32]* @reltable.main to i64)) to i32)]
define i32 @main() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64* %1)
%4 = load i64, i64* %1
%5 = srem i64 %4, 6
%6 = icmp ult i64 %5, 4
br i1 %6, label %7, label %10
7: ; preds = %0
%8 = shl i64 %5, 2
%9 = call i8* @llvm.load.relative.i64(i8* bitcast ([4 x i32]* @reltable.main to i8*), i64 %8)
br label %10
10: ; preds = %0, %7
%11 = phi i8* [ %9, %7 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @str, i64 0, i64 0), %0 ]
%12 = call i32 @puts(i8* dereferenceable(1) %11)
ret i32 0
}