#include <bits/stdc++.h>
using namespace std;
map<int, int> mp;
long long degree(long long deg) {
  long long val = 180 - deg;
  if (360 % val == 0) {
    return true;
  }
  return false;
}
int main() {
  int t;
  cin >> t;
  for (int z = 1; z <= t; z++) {
    long long n;
    cin >> n;
    if (degree(n))
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
}
