#include <bits/stdc++.h>
using namespace std;
void solve(int n)
{
if (n % 2020 <= n / 2020)
{
cout << "YES" << endl;
}
else
{
cout << "NO" << endl;
}
}
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(0);
int t;
cin >> t;
while (t--)
{
int n;
cin >> n;
solve(n);
}
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7Cgp2b2lkIHNvbHZlKGludCBuKQp7CiAgICBpZiAobiAlIDIwMjAgPD0gbiAvIDIwMjApCiAgICB7CiAgICAgICAgY291dCA8PCAiWUVTIiA8PCBlbmRsOwogICAgfQogICAgZWxzZQogICAgewogICAgICAgIGNvdXQgPDwgIk5PIiA8PCBlbmRsOwogICAgfQp9CgppbnQgbWFpbigpCnsKICAgIGlvc19iYXNlOjpzeW5jX3dpdGhfc3RkaW8oZmFsc2UpOwogICAgY2luLnRpZSgwKTsKCiAgICBpbnQgdDsKICAgIGNpbiA+PiB0OwoKICAgIHdoaWxlICh0LS0pCiAgICB7CiAgICAgICAgaW50IG47CiAgICAgICAgY2luID4+IG47CgogICAgICAgIHNvbHZlKG4pOwogICAgfQp9