Emuskald needs a fence around his farm, but he is too lazy to build it himself. So he purchased a fence-building robot.

He wants the fence to be a regular polygon. The robot builds the fence along a single path, but it can only make fence corners at a single angle *a*.

Will the robot be able to build the fence Emuskald wants? In other words, is there a regular polygon which angles are equal to *a*?
The first line of input contains an integer *t* (0 &lt; *t* &lt; 180) — the number of tests. Each of the following *t* lines contains a single integer *a* (0 &lt; *a* &lt; 180) — the angle the robot can make corners at measured in degrees.
inp = [*open(0)]
angles = [-1.0, -1.0, -1.0, 60, 90]
divs = [5, 6, 8, 9, 10, 12, 15, 18, 20, 24, 30, 36, 40, 45, 60, 72, 90, 120, 180, 360]
# def angle(n):
#     if n < 3:
#         return -1
#     if n == 3:
#         return 60
#     if n == 4:
#         return 90
#     if n%2==0:
#         return (angle(n/2+1) * (n/2+1)) / (n/2)
#     else:
#         return (angle(n//2+2) * (n//2+2) - 90) / (n/2)


for n in range(5, 361):
    if n%2==0:
        angles[n] =  (angles[n/2+1] * (n/2+1)) / (n/2)
    else:
        angles[n] = (angles[n//2+2] * (n//2+2) - 90) / (n/2)
    if n in divs:
        angles[n] = round(angles[n])

angles = set(angles)
for t in range(inp[0]):
    if inp[t+1] in angles:
        print('YES')
    else:
        print('NO')