#include <bits/stdc++.h>   using namespace std;   const long long int inf = (long long int)1e18 + 19;   const long long int mod = (long long int)1e9 + 7;   void cazz() {     long long int t = 1, i;     long double j, n;     cin >> t;     while (t--) {       cin >> n;       i = 3, j = -1;       while (j < n) {         j = (((long double)180 * (i - 2)) / i);         i++;       }       if (j == n) {         cout <<  YES n ;         continue;       }       cout <<  NO n ;     }   }   int main() {     ios_base::sync_with_stdio(false);     cin.tie(NULL);     cout.tie(NULL);     ;     cazz();     return 0;   }   