#include <bits/stdc++.h>
using namespace std;
long long pow(long long a, long long b) {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  if (b == 0)
    return 1;
  else if (b == 1)
    return a;
  else if (b % 2 == 0)
    return pow(pow(a, b / 2), 2);
  else if (b % 2 != 0)
    return a * pow(a, b - 1);
  return pow(a, b);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  long long t;
  vector<string> answers;
  cin >> t;
  for (long long abcd = 0; abcd < t; ++abcd) {
    long long test;
    cin >> test;
    if (1 <= test % 14 && test % 14 <= 6 && test > 6)
      answers.push_back("YES");
    else
      answers.push_back("NO");
  }
  for (long long i = 0; i < t; ++i) cout << answers[i] << endl;
}
