#include <iostream>
#include <bits/stdc++.h>

using namespace std;

int main()
{
    long long int t;
    cin>>t;
    while (t--)
    {
        long long n;
        cin>>n;
        if (n/2020>=n%2020)
        {
            cout<<"YES"<<endl;
        }
        else
        {
            cout<<"NO"<<endl;
        }
    }
}
