#include <bits/stdc++.h>
using namespace std;
bool checkPrime(long long n) {
  long long count = 0;
  for (long long j = 1; j * j <= n; j++) {
    if (n % j == 0) {
      if (j * j != n)
        count += 2;
      else
        count += 1;
    }
  }
  if (count == 2) return true;
  return false;
}
long long fac[10001];
long long makeSeive(long long n) {
  bool isPrime[n + 1];
  memset(isPrime, true, sizeof(isPrime));
  isPrime[0] = isPrime[1] = false;
  for (long long i = 2; i * i <= n; i++) {
    if (isPrime[i] == true) {
      for (long long j = i * i; j <= n; j += i) {
        isPrime[j] = false;
        if (fac[j] > i) {
          fac[j] = i;
        }
      }
    }
  }
  long long count = 0;
  for (long long i = 0; i <= n; i++) {
    if (isPrime[i] == true) {
      count++;
    }
  }
  return count;
}
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
class triplet {
 public:
  long long x, y, g;
};
triplet ExtendedEuclid(long long a, long long b) {
  if (b == 0) {
    triplet ans;
    ans.g = a;
    ans.x = 1;
    ans.y = 0;
    return ans;
  }
  triplet smallAns = ExtendedEuclid(b, a % b);
  triplet ans;
  ans.g = smallAns.g;
  ans.x = smallAns.y;
  ans.y = smallAns.x - (a / b) * smallAns.y;
  return ans;
}
long long MultiplicativeModuloInverse(long long a, long long m) {
  triplet ans = ExtendedEuclid(a, m);
  return (ans.x % m + m) % m;
}
long long ConvertMod(string s, long long a) {
  long long pv = 0;
  long long l = s.length();
  for (long long i = 0; i < l; i++) {
    long long x = s[i] - '0';
    pv = ((((pv) % a) * (10 % a)) % a + x % a) % a;
  }
  return pv;
}
long long phi[1000007];
long long ETF(long long n) {
  for (long long i = 0; i <= n; i++) {
    phi[i] = i;
  }
  phi[1] = 1;
  for (long long i = 2; i <= n; i++) {
    if (phi[i] == i) {
      phi[i] = i - 1;
      for (long long j = 2 * i; j <= n; j += i) {
        phi[j] = (phi[j] / i) * (i - 1);
      }
    }
  }
  return phi[n];
}
long long Power(long long a, long long n) {
  if (n == 0) return 1;
  long long t = Power(a, n / 2);
  if (n % 2) return t * t * a;
  return t * t;
}
long long modExp(long long a, long long b, long long c) {
  if (a == 0) return 0;
  if (b == 0) return 1;
  long long ans;
  if (b % 2) {
    long long smallAns = modExp(a, b - 1, c);
    ans = a % c;
    ans = (ans * smallAns) % c;
  } else {
    long long smallAns = modExp(a, b / 2, c);
    ans = (smallAns * smallAns) % c;
  }
  return (long long)((ans + c) % c);
}
void Multiply(long long A[2][2], long long B[2][2]) {
  long long C[2][2];
  memset(C, 0, sizeof(C));
  for (long long i = 0; i < 2; i++) {
    for (long long j = 0; j < 2; j++) {
      for (long long k = 0; k < 2; k++) {
        C[i][j] = (C[i][j] % (1000000007 - 1) +
                   (A[i][k] * (long long)B[k][j]) % (1000000007 - 1)) %
                  (1000000007 - 1);
      }
    }
  }
  for (long long i = 0; i < 2; i++) {
    for (long long j = 0; j < 2; j++) {
      A[i][j] = (long long)(C[i][j] % (1000000007 - 1));
    }
  }
}
void matPow(long long A[2][2], long long n) {
  if (n == 0 || n == 1) return;
  matPow(A, n / 2);
  Multiply(A, A);
  if (n & 1) {
    long long B[2][2] = {{1, 1}, {1, 0}};
    Multiply(A, B);
  }
}
long long fib(long long n) {
  if (n == 0) return 0;
  long long A[2][2] = {{1, 1}, {1, 0}};
  matPow(A, n - 1);
  return A[0][0];
}
long long modExp3(long long a, string b, long long c) {
  if (a == 0) return 0;
  if (b.length() == 1 && b[0] == '0') return 1;
  long ans = 1;
  long long l = b.length();
  for (long long i = l - 1; i >= 0; i--) {
    if (b[i] == '2') {
      ans = (((ans * a) % c) * a) % c;
    } else if (b[i] == '1') {
      ans = (ans * a) % c;
    }
    a = (((a * (long long)a) % c) * a) % c;
  }
  return (long long)((ans + c) % c);
}
double d[1000001], deno[1000001];
void fn(long long p, long long i, vector<long long> adj[]) {
  d[i] = d[p] + 1;
  if (deno[i] != 0 && adj[i].size() > 1)
    for (long long j = 0; j < adj[i].size(); j++)
      deno[adj[i][j]] = deno[i] * (adj[i].size() - 1);
  for (long long j = 0; j < adj[i].size(); j++) {
    if (adj[i][j] != p) fn(i, adj[i][j], adj);
  }
}
long long countPaths(long long n) {
  long long zB = 1;
  long long zADC = 0;
  for (long long i = 1; i <= n; i++) {
    long long nzB = (zADC % 1000000007 * 3) % 1000000007;
    long long nzADC =
        ((zADC % 1000000007 * 2) % 1000000007 + zB % 1000000007) % 1000000007;
    zB = nzB;
    zADC = nzADC;
  }
  return zB % 1000000007;
}
void construct(vector<long long> dp, long long tree[], long long low,
               long long high, long long pos) {
  if (low == high) {
    tree[pos] = dp[low];
    return;
  }
  long long mid = (low + high) / 2;
  construct(dp, tree, low, mid, 2 * pos + 1);
  construct(dp, tree, mid + 1, high, 2 * pos + 2);
  tree[pos] = max(tree[2 * pos + 1], tree[2 * pos + 2]);
}
long long rangemax(long long tree[], long long qlow, long long qhigh,
                   long long low, long long high, long long pos) {
  if (qlow <= low && qhigh >= high) return tree[pos];
  if (qlow > high || qhigh < low) return INT_MIN;
  long long mid = (low + high) / 2;
  return max(rangemax(tree, qlow, qhigh, low, mid, 2 * pos + 1),
             rangemax(tree, qlow, qhigh, mid + 1, high, 2 * pos + 2));
}
bool ifconsonent(char ch) {
  if (ch == 'a' || ch == 'i' || ch == 'e' || ch == 'o' || ch == 'u')
    return false;
  return true;
}
bool fn(long long mid, long long p, long long a[], long long k) {
  for (long long i = mid; i >= 1;) {
    if (p - a[i] >= 0) {
      p = p - a[i];
      i -= k;
    } else
      return false;
  }
  return true;
}
int32_t main() {
  long long qq;
  cin >> qq;
  long long Q = 1;
  while (qq--) {
    long long x;
    cin >> x;
    long long d = x / 14;
    if (d > 0 && x % 14 > 0 && x % 14 < 7) {
      cout << "YES\n";
    } else
      cout << "NO\n";
  }
}
