#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);
  switch (a % 6) {
  case 0:
  case 1:
  case 3:
    printf("yes\n");
    break;
  default:
    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    %rax,-0x20(%rbp)
movabs $0x2aaaaaaaaaaaaaab,%rcx
aa aa 2a
imul   %rcx
mov    -0x20(%rbp),%rax
mov    %rdx,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
add    %rdx,%rcx
add    %rcx,%rcx
lea    (%rcx,%rcx,2),%rcx
sub    %rcx,%rax
mov    %rax,-0x18(%rbp)
sub    $0x2,%rax
jb     1195 <main+0x75>
jmp    1182 <main+0x62>
mov    -0x18(%rbp),%rax
sub    $0x3,%rax
jne    11a6 <main+0x86>
jmp    1195 <main+0x75>
lea    0xe69(%rip),%rdi
call   1030 <printf@plt>
jmp    11b2 <main+0x92>
lea    0xe5d(%rip),%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
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    0xe94(%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
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64* %2)
%4 = load i64, i64* %2
%5 = srem i64 %4, 6
switch i64 %5, label %8 [
i64 0, label %6
i64 1, label %6
i64 3, label %6
]
6: ; preds = %0, %0, %0
%7 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
br label %10
8: ; preds = %0
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
br label %10
10: ; preds = %8, %6
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"%lld\00"
@str = [4 x i8] c"yes\00"
@str.3 = [3 x i8] c"no\00"
@reltable.main = [4 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([4 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 to i64), i64 ptrtoint ([4 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @str.3 to i64), i64 ptrtoint ([4 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([4 x i8]* @str 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.3, i64 0, i64 0), %0 ]
%12 = call i32 @puts(i8* dereferenceable(1) %11)
ret i32 0
}