#include using namespace std; typedef long long ll; int main() { ll n; cin >> n; int count = 0; while (n % 2 == 0) { n /= 2; count++; } while (n % 3 == 0) { n /= 3; count++; } ll i = 1; while (i * 6 - 1 <= (ll)sqrt(n)) { if (n % (i * 6 - 1) == 0) { n /= (i * 6 - 1); count++; } if (n % (i * 6 + 1) == 0) { n /= (i * 6 + 1); count++; } } if (n != 1) { count++; } if (count > 2) { cout << "YES" << endl; } else { cout << "NO" << endl; } return 0; }