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 RAHIM
    NAME: Wasi Ur Rahman
    EMAIL: wasiurrahaman247@gmail.com
    FROM RMSTU
*/
#define _USE_MATH_DEFINES
#include <bits/stdc++.h>
#define ll                     long long
#define boost                  ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define min3(a,b,c)            min(a,min(b,c))
#define min4(a,b,c,d)          min(d,min3(a,b,c))
#define min5(a,b,c,d,e)          min(e,min4(a,b,c,d))
#define max3(a,b,c)            max(a,max(b,c))
#define max4(a,b,c,d)          max(d,max3(a,b,c))
#define all(v)                 v.begin(),v.end()
#define revall(v)              v.rbegin(),v.rend()
#define gcd(a,b)                __gcd(a,b)
#define lcm(a,b)               (a*b)/gcd(a,b)
#define pb                      push_back
#define eb                     emplace_back
#define mk                     make_pair
#define F                      first
#define S                      second
#define pi                     acos(-1.0)
#define maxv(v)                *max_element(all(v))
#define minv(v)                *min_element(all(v))
#define countv(v,a)             count(all(v),a)
#define cntone(x)             __builtin_popcountll(x) // number of ones
#define cntzero(x)             __builtin_ctzll(x) // number of zeros
#define     rep(i, l, r)        for(long long i = l; i<r; i++)
#define SUM                     accumulate
#define toint(a)                atoi(a.c_str())
#define read                    freopen("input.txt","r",stdin)
#define write                   freopen("output.txt","w",stdout)
#define Unique(c)               (c).resize(unique(all(c))-(c).begin())
#define sp(a)                   fixed<<setprecision(a)
#define printv(container)       for(auto it:container) cout << it << " ";cout << endl
#define vll                     vector <ll>
#define cases(i)                cout << "Case " << i << ":"
#define yes                     cout << "YES" << endl
#define no                      cout << "NO" << endl
#define     rand(V)             random_shuffle(all(V))
#define     lb(a,X)             lower_bound(all(a),X)-a.begin()
#define     ub(a,X)             upper_bound(all(a),X)-a.begin()
#define rep(i,l,r)              for(ll i = l;i<=r;i++)
using namespace std;



/*************************************
*          DEBUGGING SECTION         *
**************************************/
template<typename T>void showSTL(T H);template<typename T,typename V>void showSTL(pair<T,V> H);
template<typename T>void showSTL(priority_queue<T> H);template<typename T>void showSTL(stack<T> H);
template<typename T,typename V>void showSTL(map<T,V> H);
template<typename T,typename V>void showSTL(multimap<T,V> H);template<typename T>void showSTL(vector<T> H);
template<typename T>void showSTL(set<T> H);template<typename T>void showSTL(multiset<T> H);
template<typename T>void showSTL(list<T> H);void showSTL(char *H);
template<typename T>void showSTL(deque<T> H);template<typename T>void showSTL(queue<T> H);
template<typename T>void showSTL(T H){stringstream ss;ss<<H;cerr<<ss.str();}
template<typename T,typename V>void showSTL(pair<T,V> H){cerr<<"(";showSTL(H.first);cerr<<"=>";showSTL(H.second);cerr<<")";}
template<typename T>void showSTL(priority_queue<T> H){cerr<<endl;while(!H.empty()){cerr<<H.top()<<endl;H.pop();}cerr<<endl;}
template<typename T>void showSTL(stack<T> H){cerr<<endl;while(!H.empty()){cerr<<H.top()<<endl;H.pop();}}
template<typename T,typename V>void showSTL(map<T,V> H){cerr<<"[ ";for(auto val:H){showSTL(val);cerr<<" ";}cerr<<"]";}
template<typename T,typename V>void showSTL(multimap<T,V> H){cerr<<"[ ";for(auto val:H){showSTL(val);cerr<<" ";}cerr<<"]";}
template<typename T>void showSTL(vector<T> H){cerr<<"[ ";for(auto val : H){showSTL(val);cerr<<' ';}cerr<<"]";}
template<typename T>void showSTL(set<T> H){cerr<<"[ ";for(auto val : H){showSTL(val);cerr<<' ';}cerr<<"]";}
template<typename T>void showSTL(multiset<T> H){cerr<<"[ ";for(auto val : H){showSTL(val);cerr<<' ';}cerr<<"]";}
template<typename T>void showSTL(list<T> H){cerr<<"[ ";for(auto val : H){showSTL(val);cerr<<' ';}cerr<<"]";}
void showSTL(char *H){for(int i=0;i<strlen(H);i++){showSTL(H[i]);};}
template<typename T>void showSTL(deque<T> H){cerr<<"[ ";for(auto val : H){showSTL(val);cerr<<' ';}cerr<<"]";}
template<typename T>void showSTL(queue<T> H){cerr<<"[ ";while(!H.empty()){showSTL(H.front());cerr<<' ';H.pop();}cerr<<"]";}
vector<string>vec_spltr(string s){s+=',';vector<string>res;while(!s.empty())
res.push_back(s.substr(0, s.find(','))),s=s.substr(s.find(',')+1);return res;}
void dbg_out(vector<string>__attribute__((unused))args,__attribute__((unused))int idx,__attribute__((unused))int LINE_NUM)
{cerr<<endl;}template<typename Head,typename... Tail>
void dbg_out ( vector <string> args, int idx, int LINE_NUM, Head H, Tail... T)
{if(idx>0)cerr<<", ";else cerr << "Line(" << LINE_NUM << "):";
cerr<<" "<<args[idx]<<" = ";showSTL(H);dbg_out(args,idx+1,LINE_NUM, T...);}
#define debug(...) dbg_out(vec_spltr(#__VA_ARGS__), 0, __LINE__, __VA_ARGS__)

     /*   CHANGE VALUE OF MOD HERE   */
#define MOD 1000000007
const int N = 1000000;

         /*    MODULAR ARITHMETICS   */
ll add(ll a,ll b,ll mod){a += b;return ((a >= mod) ? a - mod : a);}
ll sub(ll a,ll b,ll mod){a -= b;return ((a < 0) ? a + mod : a);}
ll mult(ll a,ll b,ll mod){ll ans = (a%mod)*(b%mod);if(ans >= mod)ans %= mod;return ans;}
ll bigmod(ll x,ll n,ll mod){if(n == 0)return 1;ll ans = bigmod(x,n/2,mod);ans = mult(ans,ans,mod);if(n & 1) ans = mult(x,n,mod);return ans;}


        /*    CUSTOM FUNCTIONS   */
bool isPowerOfTwo (ll x) {return x && (!(x&(x-1)));}
bool isPerfectSquare(long double x){long double sr = sqrt(x);return ((sr - floor(sr)) == 0);}
ll digNO(ll num){  return floor(log10(num)) + 1; }
int findSqrt(int n) { int lo = 0, hi = n; while (lo <= hi) { int mid = (lo + hi) / 2; if (mid * mid <= n) lo = mid + 1; else hi = mid - 1; }return lo - 1;}
ll fib(ll n){double phi = (1+sqrt(5))/2;return round(pow(phi,n)/sqrt(5));}
ll count_N_in_Fact(ll n,ll k){ll res = 0,sum = 0;for(ll i = k;;i*=k){res = n/i;if(res == 0)break;sum += res;}return sum;}
string v2s(vll &A){ll Z=A.size();string S(Z,' ');rep(i,0,Z)S[i]=A[i]+'0';return S;}
bool isPrime(ll n) {if (n <= 1) return false;if (n <= 3) return true;if (n % 2 == 0 || n % 3 == 0) return false; for (ll i = 5; i * i <= n; i = i + 6) if (n % i == 0 || n % (i + 2) == 0) return false; return true; }
void solve(){
    ll n;
        cin >> n;
        ll div = n / 2020;
        ll rem = n % 2020;
        if(div >= rem)
            yes;
        else no;
}
int main()
{
    boost;
    ll t;
    cin >> t;
    while(t--){
        solve();
    }
    return 0;
}