#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1123456;
const int MAXINT = 2147483098;
const long long MAXLL = 9223372036854775258LL;
string answer(long long x) {
  if (x < 15) return "NO";
  if (x >= 15 && x <= 20) return "YES";
  long long k = x / 14;
  x -= (k - 1) * 14;
  if (x >= 15 && x <= 20) return "YES";
  return "NO";
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int t;
  cin >> t;
  while (t--) {
    long long x;
    cin >> x;
    cout << answer(x) << '\n';
  }
  return 0;
}
