#include <bits/stdc++.h>
using namespace std;
set<pair<int, int>> all_val;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    long long val;
    cin >> val;
    if (val <= 14) {
      cout << "NO" << endl;
      continue;
    }
    int need = val % 14;
    if (need > 6 || need == 0) {
      cout << "NO";
    } else {
      cout << "YES";
    }
    cout << endl;
  }
}
