#include<bits/stdc++.h>
using namespace std;
int main()
{
	int t;
	int a,b;
	long int n;
	scanf("%d",&t);
	for(int i=0;i<t;i++){
		scanf("%ld",&n);
		a = n/2020;
		b = n%2020;
		if(a<b)	printf("NO\n");
		else	printf("YES\n");
	}
}
