#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 == 1) {
    printf("Weird");
  } else {
    if (n >= 2 && n <= 5) {
      printf("Not Weird");
    } else if (n >= 6 && n <= 20) {
      printf("Weird");
    } else if (n > 20) {
      printf("Not 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    $0x1,%edx
jne    1164 <main+0x44>
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
jmp    11d3 <main+0xb3>
cmpl   $0x2,-0x8(%rbp)
jl     1189 <main+0x69>
cmpl   $0x5,-0x8(%rbp)
jg     1189 <main+0x69>
lea    0xe84(%rip),%rdi
call   1030 <printf@plt>
jmp    11ce <main+0xae>
cmpl   $0x6,-0x8(%rbp)
jl     11ae <main+0x8e>
cmpl   $0x14,-0x8(%rbp)
jg     11ae <main+0x8e>
lea    0xe63(%rip),%rdi
call   1030 <printf@plt>
jmp    11c9 <main+0xa9>
cmpl   $0x14,-0x8(%rbp)
jle    11c4 <main+0xa4>
lea    0xe44(%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
mov    %eax,%ecx
shr    $0x1f,%ecx
add    %eax,%ecx
and    $0xfffffffe,%ecx
mov    %eax,%edx
sub    %ecx,%edx
lea    0xebc(%rip),%rdi
cmp    $0x1,%edx
je     1174 <main+0x54>
lea    -0x2(%rax),%edx
lea    0xea9(%rip),%rcx
cmp    $0x4,%edx
jae    1164 <main+0x44>
mov    %rcx,%rdi
jmp    1174 <main+0x54>
lea    -0x6(%rax),%edx
cmp    $0xf,%edx
jb     1174 <main+0x54>
mov    %rcx,%rdi
cmp    $0x15,%eax
jl     1179 <main+0x59>
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

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