#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 */
scalar_t__ EOF;
int /*<<< orphan*/ printf(char *);
scalar_t__ scanf(char *, double *, double *);
int main(void) {
  double hkm, km;
  while (scanf("%lf %lf", &hkm, &km) != EOF) {
    if (hkm < 35.5 && km < 71.0) {
      printf("AAA\n");
    } else if (hkm < 37.5 && km < 77.0) {
      printf("AA\n");
    } else if (hkm < 40.0 && km < 83.0) {
      printf("A\n");
    } else if (hkm < 43.0 && km < 89.0) {
      printf("B\n");
    } else if (hkm < 50.0 && km < 105.0) {
      printf("C\n");
    } else if (hkm < 55.0 && km < 116.0) {
      printf("D\n");
    } else if (hkm < 70.0 && km < 148.0) {
      printf("E\n");
    } else {
      printf("NA\n");
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xf3a(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
call   1040 <scanf@plt>
mov    0x2e9e(%rip),%rcx
cmp    (%rcx),%rax
je     1303 <main+0x1e3>
movsd  0xea5(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    118a <main+0x6a>
movsd  0xe9a(%rip),%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    118a <main+0x6a>
lea    0xef8(%rip),%rdi
call   1030 <printf@plt>
jmp    12fe <main+0x1de>
movsd  0xe7e(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    11c1 <main+0xa1>
movsd  0xe73(%rip),%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    11c1 <main+0xa1>
lea    0xec2(%rip),%rdi
call   1030 <printf@plt>
jmp    12f9 <main+0x1d9>
movsd  0xe57(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    11f8 <main+0xd8>
movsd  0xe4c(%rip),%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    11f8 <main+0xd8>
lea    0xe8c(%rip),%rdi
call   1030 <printf@plt>
jmp    12f4 <main+0x1d4>
movsd  0xe30(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    122f <main+0x10f>
movsd  0xe25(%rip),%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    122f <main+0x10f>
lea    0xe58(%rip),%rdi
call   1030 <printf@plt>
jmp    12ef <main+0x1cf>
movsd  0xe09(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1266 <main+0x146>
movsd  0xdfe(%rip),%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    1266 <main+0x146>
lea    0xe24(%rip),%rdi
call   1030 <printf@plt>
jmp    12ea <main+0x1ca>
movsd  0xde2(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    129d <main+0x17d>
movsd  0xdd7(%rip),%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    129d <main+0x17d>
lea    0xdf0(%rip),%rdi
call   1030 <printf@plt>
jmp    12e5 <main+0x1c5>
movsd  0xdbb(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    12d4 <main+0x1b4>
movsd  0xdb0(%rip),%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    12d4 <main+0x1b4>
lea    0xdbc(%rip),%rdi
call   1030 <printf@plt>
jmp    12e0 <main+0x1c0>
lea    0xdae(%rip),%rdi
call   1030 <printf@plt>
jmp    12e5 <main+0x1c5>
jmp    12ea <main+0x1ca>
jmp    12ef <main+0x1cf>
jmp    12f4 <main+0x1d4>
jmp    12f9 <main+0x1d9>
jmp    12fe <main+0x1de>
jmp    112f <main+0xf>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
lea    0xf3b(%rip),%rdi
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
call   1040 <scanf@plt>
mov    0x2e9d(%rip),%rbx
cmp    (%rbx),%rax
jne    1161 <main+0x41>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xf1b(%rip),%r13
lea    0xf01(%rip),%r14
lea    0x10(%rsp),%r15
lea    0x8(%rsp),%r12
lea    0xf04(%rip),%rbp
jmp    11b8 <main+0x98>
movsd  0xede(%rip),%xmm1
ucomisd %xmm0,%xmm1
lea    0xee3(%rip),%rax
cmovbe %rax,%rdi
nopl   0x0(%rax)
call   1030 <puts@plt>
mov    %r14,%rdi
mov    %r15,%rsi
mov    %r12,%rdx
call   1040 <scanf@plt>
cmp    (%rbx),%rax
je     1150 <main+0x30>
movsd  0x10(%rsp),%xmm0
movsd  0xe3a(%rip),%xmm1
ucomisd %xmm0,%xmm1
movsd  0x8(%rsp),%xmm1
jbe    11e3 <main+0xc3>
movsd  0xe2e(%rip),%xmm2
ucomisd %xmm1,%xmm2
mov    %r13,%rdi
ja     11a0 <main+0x80>
movsd  0xe25(%rip),%xmm2
ucomisd %xmm0,%xmm2
jbe    1202 <main+0xe2>
movsd  0xe1f(%rip),%xmm2
ucomisd %xmm1,%xmm2
mov    %rbp,%rdi
ja     11a0 <main+0x80>
movsd  0xe16(%rip),%xmm2
ucomisd %xmm0,%xmm2
jbe    1229 <main+0x109>
movsd  0xe10(%rip),%xmm2
ucomisd %xmm1,%xmm2
lea    0xe62(%rip),%rdi
ja     11a0 <main+0x80>
movsd  0xdff(%rip),%xmm2
ucomisd %xmm0,%xmm2
jbe    1250 <main+0x130>
movsd  0xdf9(%rip),%xmm2
ucomisd %xmm1,%xmm2
lea    0xe37(%rip),%rdi
ja     11a0 <main+0x80>
movsd  0xde8(%rip),%xmm2
ucomisd %xmm0,%xmm2
jbe    1277 <main+0x157>
movsd  0xde2(%rip),%xmm2
ucomisd %xmm1,%xmm2
lea    0xe0e(%rip),%rdi
ja     11a0 <main+0x80>
movsd  0xdd1(%rip),%xmm2
ucomisd %xmm0,%xmm2
jbe    129e <main+0x17e>
movsd  0xdcb(%rip),%xmm2
ucomisd %xmm1,%xmm2
lea    0xde5(%rip),%rdi
ja     11a0 <main+0x80>
movsd  0xdba(%rip),%xmm2
ucomisd %xmm1,%xmm2
lea    0xdca(%rip),%rdi
ja     1182 <main+0x62>
lea    0xdba(%rip),%rdi
jmp    1182 <main+0x62>

LLVM IR (-O0):
@.str = [8 x i8] c"%lf %lf\00"
@EOF = global i64 0
@.str.1 = [5 x i8] c"AAA\0A\00"
@.str.2 = [4 x i8] c"AA\0A\00"
@.str.3 = [3 x i8] c"A\0A\00"
@.str.4 = [3 x i8] c"B\0A\00"
@.str.5 = [3 x i8] c"C\0A\00"
@.str.6 = [3 x i8] c"D\0A\00"
@.str.7 = [3 x i8] c"E\0A\00"
@.str.8 = [4 x i8] c"NA\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
store i32 0, i32* %1
br label %4
4: ; preds = %72, %0
%5 = call i64 @scanf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), double* %2, double* %3)
%6 = load i64, i64* @EOF
%7 = icmp ne i64 %5, %6
br i1 %7, label %8, label %73
8: ; preds = %4
%9 = load double, double* %2
%10 = fcmp olt double %9, 3.550000e+01
br i1 %10, label %11, label %16
11: ; preds = %8
%12 = load double, double* %3
%13 = fcmp olt double %12, 7.100000e+01
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 %72
16: ; preds = %11, %8
%17 = load double, double* %2
%18 = fcmp olt double %17, 3.750000e+01
br i1 %18, label %19, label %24
19: ; preds = %16
%20 = load double, double* %3
%21 = fcmp olt double %20, 7.700000e+01
br i1 %21, label %22, label %24
22: ; preds = %19
%23 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
br label %71
24: ; preds = %19, %16
%25 = load double, double* %2
%26 = fcmp olt double %25, 4.000000e+01
br i1 %26, label %27, label %32
27: ; preds = %24
%28 = load double, double* %3
%29 = fcmp olt double %28, 8.300000e+01
br i1 %29, label %30, label %32
30: ; preds = %27
%31 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
br label %70
32: ; preds = %27, %24
%33 = load double, double* %2
%34 = fcmp olt double %33, 4.300000e+01
br i1 %34, label %35, label %40
35: ; preds = %32
%36 = load double, double* %3
%37 = fcmp olt double %36, 8.900000e+01
br i1 %37, label %38, label %40
38: ; preds = %35
%39 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
br label %69
40: ; preds = %35, %32
%41 = load double, double* %2
%42 = fcmp olt double %41, 5.000000e+01
br i1 %42, label %43, label %48
43: ; preds = %40
%44 = load double, double* %3
%45 = fcmp olt double %44, 1.050000e+02
br i1 %45, label %46, label %48
46: ; preds = %43
%47 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
br label %68
48: ; preds = %43, %40
%49 = load double, double* %2
%50 = fcmp olt double %49, 5.500000e+01
br i1 %50, label %51, label %56
51: ; preds = %48
%52 = load double, double* %3
%53 = fcmp olt double %52, 1.160000e+02
br i1 %53, label %54, label %56
54: ; preds = %51
%55 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0))
br label %67
56: ; preds = %51, %48
%57 = load double, double* %2
%58 = fcmp olt double %57, 7.000000e+01
br i1 %58, label %59, label %64
59: ; preds = %56
%60 = load double, double* %3
%61 = fcmp olt double %60, 1.480000e+02
br i1 %61, label %62, label %64
62: ; preds = %59
%63 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0))
br label %66
64: ; preds = %59, %56
%65 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0))
br label %66
66: ; preds = %64, %62
br label %67
67: ; preds = %66, %54
br label %68
68: ; preds = %67, %46
br label %69
69: ; preds = %68, %38
br label %70
70: ; preds = %69, %30
br label %71
71: ; preds = %70, %22
br label %72
72: ; preds = %71, %14
br label %4
73: ; preds = %4
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"%lf %lf\00"
@EOF = global i64 0
@str = [3 x i8] c"NA\00"
@str.9 = [2 x i8] c"E\00"
@str.10 = [2 x i8] c"D\00"
@str.11 = [2 x i8] c"C\00"
@str.12 = [2 x i8] c"B\00"
@str.13 = [2 x i8] c"A\00"
@str.14 = [3 x i8] c"AA\00"
@str.15 = [4 x i8] c"AAA\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = bitcast double* %1 to i8*
%4 = bitcast double* %2 to i8*
%5 = call i64 @scanf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), double* %1, double* %2)
%6 = load i64, i64* @EOF
%7 = icmp eq i64 %5, %6
br i1 %7, label %45, label %8
8: ; preds = %0, %39
%9 = load double, double* %1
%10 = fcmp olt double %9, 3.550000e+01
%11 = load double, double* %2
%12 = fcmp olt double %11, 7.100000e+01
%13 = select i1 %10, i1 %12, i1 false
br i1 %13, label %39, label %14
14: ; preds = %8
%15 = fcmp olt double %9, 3.750000e+01
%16 = fcmp olt double %11, 7.700000e+01
%17 = select i1 %15, i1 %16, i1 false
br i1 %17, label %39, label %18
18: ; preds = %14
%19 = fcmp olt double %9, 4.000000e+01
%20 = fcmp olt double %11, 8.300000e+01
%21 = select i1 %19, i1 %20, i1 false
br i1 %21, label %39, label %22
22: ; preds = %18
%23 = fcmp olt double %9, 4.300000e+01
%24 = fcmp olt double %11, 8.900000e+01
%25 = select i1 %23, i1 %24, i1 false
br i1 %25, label %39, label %26
26: ; preds = %22
%27 = fcmp olt double %9, 5.000000e+01
%28 = fcmp olt double %11, 1.050000e+02
%29 = select i1 %27, i1 %28, i1 false
br i1 %29, label %39, label %30
30: ; preds = %26
%31 = fcmp olt double %9, 5.500000e+01
%32 = fcmp olt double %11, 1.160000e+02
%33 = select i1 %31, i1 %32, i1 false
br i1 %33, label %39, label %34
34: ; preds = %30
%35 = fcmp olt double %9, 7.000000e+01
%36 = fcmp olt double %11, 1.480000e+02
%37 = select i1 %35, i1 %36, i1 false
%38 = select i1 %37, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @str.9, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @str, i64 0, i64 0)
br label %39
39: ; preds = %34, %30, %26, %22, %18, %14, %8
%40 = phi i8* [ getelementptr inbounds ([4 x i8], [4 x i8]* @str.15, i64 0, i64 0), %8 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @str.14, i64 0, i64 0), %14 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @str.13, i64 0, i64 0), %18 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @str.12, i64 0, i64 0), %22 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @str.11, i64 0, i64 0), %26 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @str.10, i64 0, i64 0), %30 ], [ %38, %34 ]
%41 = call i32 @puts(i8* dereferenceable(1) %40)
%42 = call i64 @scanf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), double* %1, double* %2)
%43 = load i64, i64* @EOF
%44 = icmp eq i64 %42, %43
br i1 %44, label %45, label %8
45: ; preds = %39, %0
ret i32 0
}