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
//THINK ALOUD !! 
#include <bits/stdc++.h>
#define what_is(x) cout << " -> [ " << #x << " = " << x << "]\n" 
#define what_iss(x, y) cout << " -> [ " << #x << " = " << x << " , " << #y << " = " << y << " ]\n"  

using namespace std;
using ll=long long int;
using lld=long double;
#define mp make_pair
#define pb push_back
#define accu accumulate 

#define pll pair<ll,ll>
#define pii pair<int,int> 
#define pci pair<char,int> 
#define pic pair<int,char> 
#define pls pair<ll,string>
#define psl pair<string,ll>
#define pis pair<int,string>
#define psi paid<string,int>
#define x first 
#define y second
#define fast ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);


#define rep( i, a, n ) for( ll i=a; i<n; i++)
#define per( i, a, n ) for( ll i=n-1; i>=a; i--)
#define repp( i, a, n, p ) for( ll i=a; i<n; i+=p)
#define all(c) (c).begin(), (c).end()
#define lla(c) (c).rbegin(), (c).rend()
#define mod 1000000007
#define primeSize 2000000

template <typename t> inline void print (const t & v) {
    for (const auto & i: v) {
        std::cout << i << " ";
    } std::cout << '\n';
}

template <typename t> inline void printt (const t & v) { 
    for (const auto &i: v) { 
        std::cout << i.first << " " << i.second << '\n';
    } std::cout << '\n';
}

ll bin_pow (ll a, ll b) {
    if (b == 0) return 1;
    long long res = bin_pow(a, b / 2);
    if (b % 2) return res * res * a;
    else return res * res;
}

int digit (ll i) { 
    return i > 0 ? (int) log10 ((double) i) + 1 : 1;
}

vector <bool> isPrime (primeSize, true);
void make_seive () { 
    isPrime [0] = false; 
    isPrime [1] = false; 

    for (int i = 2; i <= sqrt (primeSize); i++) { 
        if (isPrime [i]) { 
            for (int j = i * 2; j <= primeSize; j += i) { 
                isPrime [j] = false; 
            }
        }
    }
}

unsigned int next_power_of2 (unsigned int v) { 
    //    unsigned int v; // compute the next highest power of 2 of 32-bit v
    v--;
    v |= v >> 1;
    v |= v >> 2;
    v |= v >> 4;
    v |= v >> 8;
    v |= v >> 16;
    v++;
    return v; 
}

void solve () {
    int n; 
    cin >> n;

    for (int y = 0; y <= (n / 2021); y++) { 
        int x = (n - y * 2021) / 2020;

        bool good = (x * 2020 + y * 2021 == n);
        if (good and floor (x) == ceil (x)) {
            cout << "YES\n"; 
            return; 
        }
    }
    cout << "NO\n";
}

int main ( ) { 
    fast; 
    int t;
    cin >> t;
    while (t--) 
        solve (); 
}

/*
   Build and running
   g++ --std=c++17 -Wall -Wextra -Wshadow -fsanitize=undefined FILE.cpp && ./a.out < in 

   Naming 
   -for types (class/struct name) UpperCamelCase: Point, Info, SegTree 
   -functions and variable lowerCamelCase: someMethod, someVariable 
   -MACROS and constants all capital letters separated by _ : SOME_MACRO, MAX_N, MOD

*/
