#include using namespace std; int main() { long long N; cin >> N; if (N % 2 == 0) { N /= 2; if (N % 2 == 0 || N % 3 == 0) { cout << "YES" << endl;} } else if(N%3 == 0) { N /= 3; if (N % 2 == 0 || N % 3 == 0) { cout << "YES" << endl;} } else { cout << "NO" << endl; } return 0; }