#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 n;
  scanf("%d", &n);
  if (n % 2 == 0) {
    if (n >= 2 && n <= 5) {
      printf("Not Weird");
    } else if (n >= 6 && n <= 20) {
      printf("Weird");
    } else if (n > 20) {
      printf("Not Weird");
    } else {
      printf("Weird");
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    11d3 <main+0xb3>
cmpl   $0x2,-0x8(%rbp)
jl     1178 <main+0x58>
cmpl   $0x5,-0x8(%rbp)
jg     1178 <main+0x58>
lea    0xe95(%rip),%rdi
call   1030 <printf@plt>
jmp    11ce <main+0xae>
cmpl   $0x6,-0x8(%rbp)
jl     119d <main+0x7d>
cmpl   $0x14,-0x8(%rbp)
jg     119d <main+0x7d>
lea    0xe74(%rip),%rdi
call   1030 <printf@plt>
jmp    11c9 <main+0xa9>
cmpl   $0x14,-0x8(%rbp)
jle    11b8 <main+0x98>
lea    0xe55(%rip),%rdi
call   1030 <printf@plt>
jmp    11c4 <main+0xa4>
lea    0xe48(%rip),%rdi
call   1030 <printf@plt>
jmp    11c9 <main+0xa9>
jmp    11ce <main+0xae>
jmp    11d3 <main+0xb3>
xor    %eax,%eax
add    $0x10,%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),%eax
test   $0x1,%al
jne    1176 <main+0x56>
lea    -0x2(%rax),%ecx
cmp    $0x4,%ecx
jae    114b <main+0x2b>
lea    0xeba(%rip),%rdi
jmp    1171 <main+0x51>
lea    -0x6(%rax),%ecx
cmp    $0xf,%ecx
jae    115c <main+0x3c>
lea    0xead(%rip),%rdi
jmp    1171 <main+0x51>
cmp    $0x15,%eax
lea    0xe9d(%rip),%rax
lea    0xe9a(%rip),%rdi
cmovge %rax,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

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