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