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

void question()
{
    int n;
    cin>>n;
    int x=n/2020;
    int y=n%2020;
    if(y<=x) cout<<"YES"<<endl;
    else cout<<"NO"<<endl;
}

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