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 <iostream>
#include <cmath>
#include <vector>
#include <algorithm>
#include <iterator>
#include <map>
#include <unordered_map>
#include <numeric>
#include <set>
#include <string>
#include <cmath>
#include <stack>
#include <queue>
#include <tuple>
#include <cstdio>
#include <bits/stdc++.h> // useful constants here.
#include <chrono>		 //performance check

using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<vector<int>> vvi;
typedef vector<long long> vll;
typedef vector<set<int>> graph;
typedef pair<int, int> pii;
typedef vector<pair<int, int>> vpii;
typedef pair<long long, long long> pll;

//constants
ll MOD = 1e9 + 7;
//end of constants

#define setup() (ios_base::sync_with_stdio(false), cin.tie(0))
#define forN(i, n) for (int i = 0; i < int(n); i++)
#define forRange(i, l, r) for (int i = int(l); i < int(r); i++)
#define pb push_back
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define rep(i) while (i--)

template <typename T>
istream &operator>>(istream &is, vector<T> &arr)
{
	typename vector<T>::iterator a;
	for (a = arr.begin(); a != arr.end(); a++)
	{
		is >> *a;
	}
	return is;
}

template <typename T>
ostream &operator<<(ostream &os, vector<T> &arr)
{
	typename vector<T>::iterator a;
	for (a = arr.begin(); a != arr.end(); a++)
	{
		os << *a << " ";
	}
	return os;
}

template <typename T, typename U>
ostream &operator<<(ostream &os, pair<T, U> &p)
{
	os << p.first << " " << p.second << '\n';
	return os;
}

ll mul(ll a, ll b, ll md = MOD)
{
	return (a % md * b % md) % md;
}

ll add(ll a, ll b, ll md = MOD)
{
	ll ans = a + b;
	if (ans >= md)
		ans -= md;
	return ans;
}

bool valid(int i, int j, int n, int m)
{
	return i >= 0 && i < n && j >= 0 && j < m;
}

vector<pair<int, int>> dirs = {{1, 0}, {0, 1}, {-1, 0}, {0, -1}};
#ifdef KAIWAN
// FILE *in = freopen("input.txt","r",stdin);
FILE *out = freopen("output.txt", "w", stdout);
#endif

ll binPow(ll x, ll y)
{
	ll ans = 1;
	while (y > 0)
	{
		if (y % 2 == 1)
			ans = mul(ans, x);
		x = mul(x, x);
		y /= 2;
	}
	return ans;
}

ll modInverse(ll x)
{
	return binPow(x, MOD - 2);
}

int main()
{
	int t;
	cin >> t;
	rep(t)
	{
		int n;
		cin >> n;
		int terms = n / 2020;
		if (n - terms * 2020 <= terms)
			cout << "YES\n";
		else
			cout << "NO\n";
	}
}
