Emuskald needs a fence around his farm, but he is too lazy to build it himself. So he purchased a fence-building robot.

He wants the fence to be a regular polygon. The robot builds the fence along a single path, but it can only make fence corners at a single angle *a*.

Will the robot be able to build the fence Emuskald wants? In other words, is there a regular polygon which angles are equal to *a*?
The first line of input contains an integer *t* (0 &lt; *t* &lt; 180) — the number of tests. Each of the following *t* lines contains a single integer *a* (0 &lt; *a* &lt; 180) — the angle the robot can make corners at measured in degrees.
#include <bits/stdc++.h>
using namespace std;
 
#pragma GCC optimize("Ofast")
 
#define yes "YES"
#define no "NO"
#define rep(i, n) for(int i = 0; i < n; i++)
#define repv(i, v) for(auto i : v)
#define endl '\n'
#define ll long long
#define int long long
#define pb push_back
 
void fastios(){
    ios::sync_with_stdio(0);
    cin.tie(nullptr);
}
 
template <typename T>
ostream& operator << (ostream& out, vector<T>& arr) {
    for (auto& i : arr) out << i << " ";
    return out;
}
 
template <typename T>
istream& operator >> (istream& in, vector<T>& arr) {
    for (auto& i : arr) in >> i;
    return in;
}
 
const long long N = 2 * 1e5;
const long long MOD = 1000000007;
const long double EPS = 1e-10;
const long long INF = 1e9;




signed main() {
    int t;
    cin >> t;
    while (t--) {
        int n;
        cin >> n;
        if (360 % (180 - n) ==  0) {
            cout << "YES" << endl;
        } else {
            cout << "NO" << endl;
        }
    }
}