fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main() {
  5. int n;
  6. cin >> n;
  7. if (n % 400 == 0 or n % 4 == 0 and n % 100 != 0 ) {
  8. cout << "YES";
  9. } else {
  10. cout << "NO";
  11. }
  12. return 0;
  13. }
Success #stdin #stdout 0.01s 5320KB
stdin
2020
stdout
YES