#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL), cout.tie(NULL);
  long long n, x;
  cin >> n;
  while (n--) {
    cin >> x;
    long long m = x % 14;
    if (m && m <= 6 && x > 14)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
