#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int t, i, x, l;
  cin >> t;
  for (i = 0; i < t; i++) {
    cin >> x;
    if (x >= 15) {
      l = x % 14;
      if (l == 1 || l == 2 || l == 3 || l == 4 || l == 5 || l == 6) {
        cout << "YES\n";
      } else {
        cout << "NO\n";
      }
    } else {
      cout << "NO\n";
    }
  }
  return 0;
}
