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.
'''Ye G-305 walo ne bola tha long back ki do try

sorry but maine iske liye formula dekha 
yaha se 
https://www.math-only-math.com/sum-of-the-interior-angles-of-an-n-sided-polygon.html#:~:text=In%20a%20regular%20polygon%20of,4)%C3%9790%C2%B0n.

'''
for _ in range(int(input())):
    a=int(input())
    dekhoside=360/(180-a)
    if dekhoside==int(dekhoside):print('YES')
    else:print('NO')