#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 powerOf2(int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int digit;
  scanf("%d", &digit);
  if (digit < 1) {
    printf("no\n");
  } else if (digit == 1) {
    printf("yes\n");
    return 0;
  } else if (digit % 2 != 0) {
    printf("no\n");
    return 0;
  } else if (powerOf2(digit) == 1) {
    printf("yes\n");
  } else {
    printf("no\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
cmpl   $0x1,-0x8(%rbp)
jge    116a <main+0x3a>
lea    0xea3(%rip),%rdi
call   1030 <printf@plt>
jmp    11f5 <main+0xc5>
cmpl   $0x1,-0x8(%rbp)
jne    118c <main+0x5c>
lea    0xe8c(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    11fc <main+0xcc>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     11b8 <main+0x88>
lea    0xe5c(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    11fc <main+0xcc>
mov    -0x8(%rbp),%edi
call   1040 <powerOf2@plt>
cmp    $0x1,%eax
jne    11da <main+0xaa>
lea    0xe37(%rip),%rdi
call   1030 <printf@plt>
jmp    11e6 <main+0xb6>
lea    0xe22(%rip),%rdi
call   1030 <printf@plt>
jmp    11eb <main+0xbb>
jmp    11f0 <main+0xc0>
jmp    11f5 <main+0xc5>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%eax
lea    0xeba(%rip),%rdi
test   %eax,%eax
jle    117f <main+0x4f>
cmp    $0x1,%eax
jne    115f <main+0x2f>
lea    0xea6(%rip),%rdi
jmp    117f <main+0x4f>
test   $0x1,%al
jne    117f <main+0x4f>
mov    %eax,%edi
call   1040 <powerOf2@plt>
cmp    $0x1,%eax
lea    0xe8f(%rip),%rax
lea    0xe8c(%rip),%rdi
cmove  %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"no\0A\00"
@.str.2 = [5 x i8] c"yes\0A\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 = icmp slt i32 %4, 1
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
br label %30
8: ; preds = %0
%9 = load i32, i32* %2
%10 = icmp eq i32 %9, 1
br i1 %10, label %11, label %13
11: ; preds = %8
%12 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %1
br label %31
13: ; preds = %8
%14 = load i32, i32* %2
%15 = srem i32 %14, 2
%16 = icmp ne i32 %15, 0
br i1 %16, label %17, label %19
17: ; preds = %13
%18 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %1
br label %31
19: ; preds = %13
%20 = load i32, i32* %2
%21 = call i32 @powerOf2(i32 %20)
%22 = icmp eq i32 %21, 1
br i1 %22, label %23, label %25
23: ; preds = %19
%24 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %27
25: ; preds = %19
%26 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
br label %27
27: ; preds = %25, %23
br label %28
28: ; preds = %27
br label %29
29: ; preds = %28
br label %30
30: ; preds = %29, %6
store i32 0, i32* %1
br label %31
31: ; preds = %30, %17, %11
%32 = load i32, i32* %1
ret i32 %32
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@str.5 = [4 x i8] c"yes\00"
@str.6 = [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, 1
br i1 %5, label %15, label %6
6: ; preds = %0
%7 = icmp eq i32 %4, 1
br i1 %7, label %15, label %8
8: ; preds = %6
%9 = and i32 %4, 1
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %15
11: ; preds = %8
%12 = call i32 @powerOf2(i32 %4)
%13 = icmp eq i32 %12, 1
%14 = select i1 %13, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.5, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @str.6, i64 0, i64 0)
br label %15
15: ; preds = %11, %8, %6, %0
%16 = phi i8* [ getelementptr inbounds ([3 x i8], [3 x i8]* @str.6, i64 0, i64 0), %0 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @str.5, i64 0, i64 0), %6 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @str.6, i64 0, i64 0), %8 ], [ %14, %11 ]
%17 = call i32 @puts(i8* dereferenceable(1) %16)
ret i32 0
}