#include <bits/stdc++.h>
using namespace std;
int main() {
  int t, n;
  cin >> t;
  while (t--) {
    cin >> n;
    float exp = 2.0 / (1.0 - ((float)n / 180.0));
    exp == (int)(exp) ? cout << "YES" : cout << "NO";
    cout << '\n';
  }
}
