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