#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  ;
  long long t, x, ans;
  cin >> t;
  while (t--) {
    cin >> x;
    ans = x / 7;
    if (x < 15 || ans % 2 || ans * 7 == x)
      cout << "NO"
           << "\n";
    else
      cout << "YES"
           << "\n";
  }
}
