#include using namespace std; using ll = long long; map prime; void prime_factor(ll n){ ll m = n; if (n % 2 == 0){ while(n % 2 == 0){ prime[2]++; n /= 2; } } for (ll i = 3; i*i <= m; i+=2){ if (n % i == 0){ while(n % i == 0){ prime[i]++; n /= i; } } } if (n != 1){ prime[n]++; } } //X!が素数pで何回割り切れるか ll Legendre(ll X, ll p){ ll cnt=0, q=p; while(X/q > 0){ cnt += X/q; if (q <= X/p) q *= p; else break; } return cnt; } int main(){ ll N; cin >> N; prime_factor(N); cout << (prime.size() <= 2 ? "Yes" : "No") << endl; return 0; }