#include<iostream>
#include<bits/stdc++.h>
using namespace std;
int main()
{
    int t,x,y,z;
    cin>>t;
    while(t--)
    {
        int flag =0;
        cin>>x;
        if(x%(2020)==0)
        {
            cout<<"YES\n";
            flag=1;
        }
        else if(x%(2021)==0)
        {
            cout<<"YES\n";
            flag=1;
        }
        else
        {
            y=0;
            while(y<x)
            {
                z=x;
                y+=2020;
                if((z-y)%(2021)==0)
                {cout<<"YES\n";
                flag=1;
                break;}
            
            }
        }
        if(flag==0)
        {
           // cout<<"hi";
            cout<<"No\n";
        }
    }
    return 0;
}