#include <bits/stdc++.h>
using namespace std;
const long long mod = 998244353;
const int N = 2e5 + 100;
const int maxn = 1e6;
const int MAXL = sqrt(1e14) + 1;
inline int read() {
  char c = getchar();
  int x = 0, f = 1;
  while (c < '0' || c > '9') {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') x = x * 10 + c - '0', c = getchar();
  return x * f;
}
int n;
long long x;
void solve() {
  scanf("%lld", &x);
  long long a = 0, b = 0;
  a = x / 14;
  b = x % 14;
  if (a == 0)
    puts("NO");
  else {
    if (b >= 1 && b <= 6)
      puts("YES");
    else
      puts("NO");
  }
}
int main() {
  int T = 1;
  scanf("%d", &T);
  int tt = 0;
  while (T--) {
    solve();
  }
  return 0;
}
