#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 5;
const long long MOD = 1e9 + 7;
int N, M, K, Q, T;
int main() {
  int i, j;
  long long x;
  scanf("%d", &N);
  while (N--) {
    scanf("%lld", &x);
    long long q = x / 14ll;
    int r = x % 14ll;
    if (q && 1 <= r && r <= 6)
      printf("YES\n");
    else
      printf("NO\n");
  }
}
