#include using namespace std; int main(){ int P; cin >> P; if (P % 8 == 1 || P % 8 == 7){ cout << "YES" << endl; } else { cout << "NO" << endl; } }