#include <iostream>

using namespace std;

int main()
{
    int t;
    cin>>t;
    for(int i=0;i<t;i++)
    {
        int long n,j;
        int a,b;
        cin>>n;
        a=n/2020;
        b=n%2020;
        if(b<=a)
            cout<<"YES"<<endl;
        else
            cout<<"NO"<<endl;
    }
    return 0;
}
