#include #include #include #include #include #include int main() { /* default begin */ long i, j, k; long n, m; long temp; long t; std::vector v; bool b; /* default end */ long N; long count = 0; std::cin >> N; if( N <= 7 ) { std::cout << "NO" << std::endl; return 0; } b = false; t = (long)sqrt((double)N)+1; i = 2; if( (N & 0x03) == 0 ) { b = true; goto label_1; } else { if( (N & 0x01) == 0 ) { count++; N >>= 1; } } i = 3; while( (N % i) == 0 ) { if( count >= 2 ) { b = true; goto label_1; } count++; N /= i; t = (long)sqrt((double)N)+1; } for(i = 5; i <= t;) { while( (N % i) == 0 ) { if( count >= 2 ) { b = true; goto label_1; } count++; N /= i; t = (long)sqrt((double)N)+1; } i += 2; while( (N % i) == 0 ) { if( count >= 2 ) { b = true; goto label_1; } count++; N /= i; t = (long)sqrt((double)N)+1; } i += 4; } if( N != 1 ) { if( count >= 2 ) { b = true; } } label_1: if( b ) { std::cout << "YES" << std::endl; } else { std::cout << "NO" << std::endl; } return 0; }