#include <bits/stdc++.h>
using namespace std;
int mod = 1000000007;
long long int inf = 1000000000000000000;
int main() {
  iostream::sync_with_stdio(false);
  cin.tie(0);
  int t;
  cin >> t;
  while (t--) {
    long long int x;
    cin >> x;
    if (x < 15) {
      cout << "NO\n";
      continue;
    }
    x -= 15;
    long long int c = x / 14;
    x -= c * 14;
    if (x >= 0 && x <= 5)
      cout << "YES\n";
    else
      cout << "NO\n";
  }
}
