fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int n;
  6. cin >> n;
  7.  
  8. if ((n % 400 == 0) || (n % 4 == 0 && n % 100 != 0)) {
  9. cout << "YES" << endl;
  10. } else {
  11. cout << "NO" << endl;
  12. }
  13.  
  14. return 0;
  15. }
  16.  
Success #stdin #stdout 0s 5284KB
stdin
Standard input is empty
stdout
NO