#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
int t,a;
cin>>t;
while(t--)
{
cin>>a;
if(360%(180-a)==0)
cout<<"YES"<<endl;
else
cout<<"NO"<<endl;
}
return 0;
}
需要知道:多边形的外角和为360°,且正多边形的内角不可能小于30°