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

// Problem: B. Новогоднее число
// Contest: Codeforces - Codeforces Round #697 (Div. 3)
// URL: http://codeforces.com/contest/1475/problem/B
// Memory Limit: 256 MB
// Time Limit: 2000 ms
// Powered by CP Editor (https://github.com/cpeditor/cpeditor)

#include <bits/stdc++.h>
 
using namespace std;

//data types 
#define db long double
#define ll long long 
#define str string 

// pairs 
#define pii pair < int, int >
#define pll pair < ll, ll >
#define pdb pair < db, db>
#define mp make_pair
#define fi first
#define se second

// vectors 
#define vei vector < int > // parkour game 
#define vell vector < ll >
#define vedb vector < db > 
#define pb push_back


//general templates 
#define all(x) x.begin(), x.end()
#define sz(s) int((s).size())
#define sup(a, n) sort(a + 1, a + n + 1); // sup, broo!!!
#define sdown(a, n) sort (a + 1, a + n + 1, greater<>());
#define sll(a) sort(a.begin(), a.end());
#define ret return
#define retz return 0
#define speedup ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0)
#define nl "\n"
#define sp ' '

const int N = 1e5 + 123, INF = 1e9;	

void solve() {
	int n;
	cin >> n;
	for (int i = 0; i <= 1000; i++) {
		if (2020 * i > n) 
			break;
		for (int j = 0; j <= 1000; j++) {
			if (2020 * i + 2021 * j == n) {
				cout << "YES" << nl;
				ret;
			}
			if (2020 * i + 2021 * j > n) 
				break;
		}
	}
	cout << "NO" << nl;
}

int main() {
	speedup;

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