#include <bits/stdc++.h>
using namespace std;
#define int long long
bool isPowerOfTwo(int n)
{
   if(n==0)
   return false;
 
   return (ceil(log2(n)) == floor(log2(n)));
}
bool isPrime(int n) 
{ 
    if (n <= 1) 
        return false; 
    if (n <= 3) 
        return true; 
  

    if (n % 2 == 0 || n % 3 == 0) 
        return false; 
  
    for (int i = 5; i * i <= n; i = i + 6) 
        if (n % i == 0 || n % (i + 2) == 0) 
            return false; 
  
    return true; 
} 

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

  
    

	return 0;
}