#include <bits/stdc++.h>
int main(void) {
  int n, a[180], i;
  scanf("%i", &n);
  for (i = 0; i < n; i++) {
    scanf("%i", &a[i]);
    if (a[i] == 60)
      printf("YES\n");
    else if (a[i] == 90)
      printf("YES\n");
    else if (a[i] == 108)
      printf("YES\n");
    else if (a[i] == 120)
      printf("YES\n");
    else if (a[i] == 135)
      printf("YES\n");
    else if (a[i] == 140)
      printf("YES\n");
    else if (a[i] == 144)
      printf("YES\n");
    else if (a[i] == 150)
      printf("YES\n");
    else if (a[i] == 156)
      printf("YES\n");
    else if (a[i] == 160)
      printf("YES\n");
    else if (a[i] == 162)
      printf("YES\n");
    else if (a[i] == 165)
      printf("YES\n");
    else if (a[i] == 168)
      printf("YES\n");
    else if (a[i] == 170)
      printf("YES\n");
    else if (a[i] == 171)
      printf("YES\n");
    else if (a[i] == 172)
      printf("YES\n");
    else if (a[i] == 174)
      printf("YES\n");
    else if (a[i] == 175)
      printf("YES\n");
    else if (a[i] == 176)
      printf("YES\n");
    else if (a[i] == 177)
      printf("YES\n");
    else if (a[i] == 178)
      printf("YES\n");
    else if (a[i] == 179)
      printf("YES\n");
    else
      printf("NO\n");
  }
  return 0;
}
