#include <bits/stdc++.h>
int main() {
  long long int i, n, t, s = 0;
  scanf("%lld", &t);
  while (t--) {
    scanf("%lld", &n);
    if (n < 15 || n % 14 == 0 || n % 14 > 6)
      printf("NO\n");
    else
      printf("YES\n");
  }
}
