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

int main(){
    long long t;
    cin>>t;
    while(t--){	
        long long n;
        cin>>n;
        if(n<2020){
            cout<<"NO\n";
            continue;
        }
        if(n%2020==0){
            cout<<"YES\n";
            continue;
        }
        if(n%2021==0){
            cout<<"YES\n";
            continue;
        }
        long long ans = 0;
        for(int i=1;i<=n;i++){
            if((n-i)%2020==0){
                ans = i;
                break;
            }
        }
        if(ans*2020<=n){
            cout<<"YES\n";
            continue;
        }
        cout<<"NO\n";
    }
    return 0;
}