#include <bits/stdc++.h>
using namespace std ;
#define ll long long
int main()
{
    ios::sync_with_stdio(false),cin.tie(nullptr),cout.tie(nullptr);
    int t,n,x ;
    cin >> n ;
    while (n--)
    {
        cin >> t ;
        //cout << t/2020 << " " << t%2020 << endl ;
        x=t/2020 ;
        t%=2020 ;
        cout << (t<=x ? "YES\n" : "NO\n" ) ;
    }
    return 0 ;
}
/*

*/
