#include<bits/stdc++.h>
using namespace std;

using ll=long long;
using ull=unsigned long long;
using i128=__int128_t;
using u128=__uint128_t;
using ld=long double;

void solve()
{
	ll x;//找规律 小于等于15的 只要能用3和8拼起来就可以 
	cin >> x;//15.16.17都能用3和8拼起来 那么以后的数只要在这三个数的基础上加n个3就能实现
	if(x!=2&&x!=3&&x!=5&&x!=6&&x!=8&&x!=11&&x!=14) cout << "Yes" << "\n";
	else cout << "No" << "\n";
}

int main()
{
	ios::sync_with_stdio(false);
	cin.tie(nullptr);
	
	int t=1;
	cin >> t;
	
	while(t--)
	{
		solve();
	}
	return 0;
}