#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
ll mod=1e9+7;

//BEING CODER
void solve()
{
 ll N;
 cin>>N;
ll rem=N%2020;
if(N-2021*rem>=0 && (N-2021*rem)%2020==0)
cout<<"YES"<<endl;
else
cout<<"NO"<<endl;
}
int main()
{
    ll t=1;
     cin>>t;
    while(t--)
    {
        solve();
    }
    return(0);
}
