Polycarp remembered the 2020-th year, and he is happy with the arrival of the new 2021-th year. To remember such a wonderful moment, Polycarp wants to represent the number n as the sum of a certain number of 2020 and a certain number of 2021.

For example, if: 

  * n=4041, then the number n can be represented as the sum 2020 + 2021; 
  * n=4042, then the number n can be represented as the sum 2021 + 2021; 
  * n=8081, then the number n can be represented as the sum 2020 + 2020 + 2020 + 2021; 
  * n=8079, then the number n cannot be represented as the sum of the numbers 2020 and 2021. 



Help Polycarp to find out whether the number n can be represented as the sum of a certain number of numbers 2020 and a certain number of numbers 2021.

Input

The first line contains one integer t (1 ≤ t ≤ 10^4) — the number of test cases. Then t test cases follow.

Each test case contains one integer n (1 ≤ n ≤ 10^6) — the number that Polycarp wants to represent as the sum of the numbers 2020 and 2021.

Output

For each test case, output on a separate line: 

  * "YES" if the number n is representable as the sum of a certain number of 2020 and a certain number of 2021; 
  * "NO" otherwise. 



You can output "YES" and "NO" in any case (for example, the strings yEs, yes, Yes and YES will be recognized as positive).

Example

Input


5
1
4041
4042
8081
8079


Output


NO
YES
YES
YES
NO
/*** "Bismillahir Rahmanir Raheem" ***/
/*** "ALHAMDULILLAH for Everything" ***/
/*** "Md. Al Asad Nur Riyad" ***/
/*
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimization ("unroll-loops")
*/
 
#include<bits/stdc++.h>
using namespace std;
#define  fastt      			ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define  TP         			template < typename F, typename S >
#define  case(x)    			cout << "Case " << x <<": "
#define  debug      			printf("Come here!\n")
#define  mem(a,b)   			memset(a,b,sizeof(a))
#define  rall(qz)   			qz.rbegin(),qz.rend()
#define  inf        			1000000000000000000
#define  all(qz)    			qz.begin(),qz.end()
#define  Sqr(x)     			((x) * (x))
#define  ll         			long long 
#define  tani(a)    			atan(a)/(pi/180)
#define  sini(a)    			asin(a)/(pi/180)
#define  cosi(a)    			acos(a)/(pi/180)
#define  cos(a)     			cos(a*pi/180)
#define  sin(a)     			sin(a*pi/180)
#define  tan(a)     			tan(a*pi/180)
#define  mod        			1000000007
#define  pi         			acos(-1.0) 
#define  pql        			priority_queue<ll>
#define  minpql     			priority_queue<ll,vector<ll>,greater<ll> >
#define  setbits(x)             __builtin_popcountll(x)
#define  zerobits(x)            __builtin_ctzll(x)
#define  dbg(args...)do{        cerr << #args << "-> " ;  show(args); } while(0); cerr<< endl ;
#define  TS                     template < typename T >
#define  TP                     template < typename F, typename S >
#define  TM                     template<typename T1, typename... T2>
 
#define toll(a) atoll(a.c_str())
string tostr(ll a) {stringstream rr;rr<<a;return rr.str();}
ll Pow(ll c,ll d){return d==0?:c*pow(c,d-1);}
ll gcd(ll a,ll b) {return b==0? a:gcd(b,a%b);}
ll lcm(ll a,ll b) {return ((a*b)/gcd(a,b));}
 
/** Debugging Tool **//*
TS void show(const T& v) { cerr << v << ' ' ;}
TM void show(const T1& first,const T2&... rest){show(first);show(rest...);}
TP ostream& operator<<(ostream& os,const pair<F,S>& p){return os<<"("<<p.ff<<", "<<p.ss<<")";}
TS ostream& operator<<(ostream& os,const vector<T>& v){os << "{"; typename vector< T >::const_iterator it;
    for(it=v.begin();it!=v.end();it++){if( it != v.begin() )os<<", ";os<<*it;}return os<<"}";}
TS ostream& operator<<(ostream& os,const set<T>& v){os<<"[";typename set<T>::const_iterator it;
    for(it=v.begin();it!=v.end();it++){if(it!=v.begin())os<<", ";os<<*it;}return os<<"]";}
TP ostream& operator<<(ostream& os,const map<F,S>& v){os<<"[";typename map<F,S>::const_iterator it;
    for(it=v.begin();it!=v.end();it++){if(it!=v.begin())os<<", ";os<<it->ff<<" = "<<it->ss;}return os<<"]";}
/** Ends **/
 
/** Functions Start **//*
TP inline F setBit(F mask, S pos) { return mask |= ((F)1 << pos) ; }
TP inline bool getBit(F mask, S pos) { return (bool)(mask & ((F)1 << pos)) ; }
TP inline F resetBit(F mask, S pos) { return mask &= (~((F)1 << pos)) ; }
TP inline F toggleBit(F mask, S pos){ return mask ^= ((F)1 << pos) ; }
 
ll egcd(ll a,ll b,ll &x,ll &y){if(b==0){x=1;y=0;return a;}ll x1,y1;ll gcd=egcd(b,a%b,x1,y1);x=y1;y=x1-y1*(a/b);return gcd;}
ll bigMod(ll a,ll b){a%=mod;ll res=1;while(b>0){if(b&1)res=(res*a)%mod;a=(a*a)%mod;b>>=1;}return res;}
 
inline ll MOD(ll a){ return (a%mod + mod) %mod ; }
inline ll modAdd(ll a,ll b){ return MOD( MOD(a) + MOD(b) ) ; }
inline ll modSub(ll a,ll b){ return MOD( MOD(a) - MOD(b) ) ; }
inline ll modMul(ll a,ll b){ return MOD( MOD(a) * MOD(b) ) ; }
inline ll modInv(ll a){ return bigMod(a,mod-2) ; }
/** Functions End **/
 
/** Direction Array **//*
int dx[]={-1, 0, 0, 1};
int dy[]={0, -1, 1, 0};
int dx1[]={-1, -1, -1, 0, 0, 0, 1, 1, 1};
int dy1[]={-1, 0, 1, -1, 0, 1, -1, 0, 1};
/** Direction Array ends **/
 
/*-----------------------------------------------------*/
 
 
 
int main()
{
    fastt
    
 
    ll t;
    cin>>t;
    while(t--){
    	ll n;
    	cin>>n;
    	bool flag=false;
    	ll a=2020,b=2021;
    	for(ll i=0;i<=600;i++){
    		ll x=n-(i*a);
    		if(x>=0){
    			if(x%b==0){
    				flag=true;
    				break;
    			}
    		}

    	}
    	if(flag) cout<<"YES"<<endl;
    	else cout<<"NO"<<endl;
    }
    return 0;
}