fork(1) download
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int main()
  4. {
  5. int t;
  6. cin>>t;
  7. while(t--)
  8. {
  9. int n;cin>>n;
  10. int count=0;
  11. if(n<2020)
  12. {
  13. cout<<"NO"<<"\n";
  14. }
  15. else
  16. {
  17.  
  18.  
  19. if((n%2020)==0 || (n%2021)==0)
  20. {
  21. count++;
  22. }
  23.  
  24.  
  25. }
  26. if(count%2==0)
  27. {
  28. cout<<"NO"<<"\n";
  29. }
  30. else
  31. {
  32. cout<<"YES"<<"\n";
  33.  
  34. }
  35.  
  36. }
  37. }
Success #stdin #stdout 0s 5012KB
stdin
5
1
20210
20211
8081
8079
stdout
NO
NO
YES
NO
NO
NO