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
#include <bits/stdc++.h>

using namespace std;
#define ll long long
ll mkItll(string str){

    ll val = 0,len = str.size();
    for(ll i = 0; i < len; i++){
        val = val * 10 + str[i] - 48;
    }
    return val;
}
long long gcd(long long  a, long long b)
{
  if (b == 0)
    return a;
  return gcd(b, a % b);
}

long long lcm(ll a, ll b)
{
    return (a / gcd(a, b)) * b;
}

bool isPrime(int n){
if(n==1)return false;
for(int i=2;i*i<=n;i++){
    if(n%i==0)return false;
}
return true;
}


vector<ll>primes;
bool ar[10000005];

void sieve(){
int maxN=1000005;
ar[0]=ar[1]=true;

for(ll i=2;i*i<=maxN;i++){
    if(!ar[i]){
        for(ll j=i*i;j<=maxN;j+=i){
            ar[j]=true;
        }
    }
}
for(ll i=2;i<=maxN;i++){
    if(!ar[i]){
        primes.push_back(i);
    }

}

}
//all digit after the comma long division
// a/b=-------
string allDigitAfterComma(int a,int b){
    string ans="";
   while (ans.size()!=500)
   {
       if(a<b)
       {
           a*=10;

           while (a<b)
           {
               ans+='0';
               a*=10;
           }

       }
       else
       {
           char ch=(a/b+'0');
           ans+=ch;
           ll rem=a%b;
           if(rem==0)
           {
               ans+='0';
               break;
           }
           else
           {
               a=rem;
           }

       }
   }
return ans;
}
pair<int,string> fun(string s){
char last;
int cnt=0;
if(s.size()>3){
for(int i=0;i<3;i++){
  last=s[i];
  for(int j=i+3;j<s.size();j+=3){
    if(s[j]!=last){
        s[j]=last;
        cnt++;
    }
  }

}


}
pair<int,string>p[1];
p[0].second=s;
p[0].first=cnt;
return {cnt,s};

}

bool issorted(vector<int>arr,vector<int>brr){
bool f=1;
for(int i=0;i<arr.size();i++){
    if(arr[i]==brr[i])continue;
    else {
        f=0;
        break;
    }
}
return f;
}
int mkItInt(string str){

    int val = 0,len = str.size();
    for(int i = 0; i < len; i++){
        val = val * 10 + str[i] - 48;
    }
    return val;
}

string inttostr(int x){


stringstream ss;
ss<<x;
string str=ss.str();
return str;
}

vector<int>go={0,1,5,-1,-1,2,-1,-1,8,-1,};
int inf=1e9;
int get(int x){
    string s=inttostr(x);
    if((int)s.size()==1)s="0"+s;
    string ans="";
    for(int i=1;i>=0;i--){
        if(go[s[i]-'0']==-1)return inf;
        ans+=char(go[s[i]-'0']+'0');
    }
    return mkItInt(ans);
}
string good(int x){
string ans=inttostr(x);
if(x<10){
    ans="0"+ans;
}
return ans;
}

bool check(string s,char c,char t){
vector<int>v;
for(int i=0;i<s.size()-1;i++){
    if(s[i]!=c){
        s[i]=c;
        if(s[i+1]==c)s[i+1]=t;
        else s[i+1]=c;

        v.push_back(i+1);
    }
}
for(int i=1;i<s.size();i++){
    if(s[i]!=s[i-1])return false;
}
cout<<v.size()<<"\n";
for(auto c:v)cout<<c<<" ";
cout<<s<<"\n";

return true;


}
void remove(string &s,const string &c){
auto pos=s.find(c);
if(pos==string::npos){
    cout<<-1;
    exit(0);
}
s.erase(0,pos+1);
}



int main()
{
ios_base::sync_with_stdio(false);
cin.tie(0);
int t;
cin>>t;
while(t--){
    ll n;
    cin>>n;
   if(n<2020){
    cout<<"NO\n";
    continue;
   }
   int cnt=0;
   while(n%2020!=0&&n>2020){
    n-=2021;
   }
   if(n%2020==0){
    cout<<"YES\n";
   }
   else{
    cout<<"NO\n";
   }


}


    return 0;
}

