#include <bits/stdc++.h>
using namespace std;
int opp[6][2] = {{1, 6}, {5, 2}, {4, 3}, {3, 4}, {2, 5}, {6, 1}};
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  long long query;
  cin >> query;
  for (long long i = 0; i < query; i++) {
    long long total;
    cin >> total;
    long long val = total % 14;
    if (val >= 1 && val <= 6 && total > 14)
      cout << "YES" << endl;
    else {
      cout << "NO" << endl;
    }
  }
}
