#include <bits/stdc++.h>
using namespace std;
int main() {
  unsigned long long n;
  cin >> n;
  unsigned long long ar[n], i;
  for (i = 0; i < n; i++) cin >> ar[i];
  for (i = 0; i < n; i++) {
    unsigned long long rem = ar[i] - ((ar[i] / 14) * 14);
    if (ar[i] < 15)
      cout << "NO\n";
    else if (rem >= 1 and rem <= 6)
      cout << "YES\n";
    else
      cout << "NO\n";
  }
  return 0;
}
