In what concerns the continuous evaluation solving exercises grade during the semester, you should submit until 23:59 of March 10th
(this exercise will still be available for submission after that deadline, but without couting towards your grade)
[to understand the context of this problem, you should read the class #02 exercise sheet]


[PII012] Grading Exams

Can you help the teacher grade the "Programming II" exams?

The Problem

Write a program that, given a numeric grade G, assigns a corresponding scale based on the following criteria:

Percentage Range Grade
[90%, 100%] A
[70%, 90%[ B
[50%, 70%[ C
[30%, 50%[ D
[0%, 30%[ E

Any grade below should result in a "NA" (not applicable) output and grades above 100 should be set to grade A.

Input

The input consists of a single floating-point G representing the grade.

Output

The output should be a single line displaying the corresponding scale (A, B, C, D, E, or NA).

Constraints

The following limits are guaranteed in all the test cases that will be given to your program:

-150 ≤ G ≤ 150       Range of grades

Example Input 1 Example Output 1
65.5
C

Example Input 2 Example Output 2
120
A

Example Input 3 Example Output 3
-42
NA

Example Input 4 Example Output 4
49.98
D

Programming II (CCINF1002)
DCC/FCUP - University of Porto