fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. long k;
  6.  
  7. cin >> k;
  8.  
  9. // we can prove that the problem can be solved for any integer k >= 8
  10. if (k >= 8 || k % 3 == 0 || k % 5 == 0)
  11. cout << "YES";
  12. else
  13. cout << "NO";
  14.  
  15. return 0;
  16. }
Success #stdin #stdout 0s 16064KB
stdin
4
stdout
NO