Editorial for A New Room


Remember to use this editorial only when stuck, and not to copy-paste code from it. Please be respectful to the problem author and editorialist.

Submitting an official solution before solving the problem yourself is a bannable offence.

tr

Odanın bir iç açısı \(\mathbf{a}\) olan düzgün çokgen olması isteniyor. Başka bir deyişle Bico'nun her bir dış açısı \(180 - \mathbf{a}\) olan düzgün çokgen şeklinde odalar üretmesi gerek. Bütün çokgenlerin dış açılarının toplamının 360 derece olduğunu ve düzgün çokgenlerin tüm dış açılarının birbirine eşit olduğunu göz önünde bulundurursak, dış açıları (\(180 - \mathbf{a}\)) 360'ı bölen \(\mathbf{a}\)'larda "YES", diğer türlü \(\mathbf{a}\)'larda ise "NO" yazdırmamız gerek.

en

The desired room is a regular polygon with an interior angle of \(\mathbf{a}\). In other words, Bico needs to build a room in the shape of a regular polygon, with an exterior angle of \(180 - \mathbf{a}\). Since the sum of all exterior angles of a polygon is 360 degrees and the exterior angles of a regular polygon are identical, the polygons whose exterior angles (\(180 - \mathbf{a}\)) divide 360 will be accepted, whereas the others will be not.

sample solution:
t = int(input())
for _ in range(t):
    x = 180 - int(input())
    print("NO") if 360%x else print("YES")