#include <bits/stdc++.h>
using namespace std;
int main() {
  int test;
  cin >> test;
  while (test--) {
    int t;
    cin >> t;
    int k = 180 - t;
    if ((180 * 2) % k == 0)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
}
