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

int main() {
  ios::sync_with_stdio(0);
  int tests;
  cin >> tests;
  int k;
  while (tests--) {
    cin >> k;
    int count = 0;
    while (k >= 2020) {
      k -= 2020;
      count++;
    }
    if (k <= count) {
      cout << "YES\n";
    } else {
      cout << "NO\n";
    }
  }
}