#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
long long int const mod = 1000000007;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int t, x, d;
  cin >> t;
  bool b;
  while (t--) {
    cin >> x;
    b = false;
    for (long long int i = 15; i <= 20; i++) {
      d = x - i;
      if (d >= 0 && d % 14 == 0) b = true;
    }
    if (b)
      cout << "YES"
           << "\n";
    else
      cout << "NO"
           << "\n";
  }
  return 0;
}
