#ifndef hari64 #include // #pragma GCC target("avx2") // #pragma GCC optimize("O3") // #pragma GCC optimize("unroll-loops") #define debug(...) #else #include "util/viewer.hpp" #define debug(...) viewer::_debug(__LINE__, #__VA_ARGS__, __VA_ARGS__) #endif // clang-format off using namespace std; using ll = long long; using ld = long double; using pii = pair; using pll = pair; template using vc = vector; template using vvc = vector>; template using vvvc = vector>; using vi = vc; using vl = vc; using vpi = vc; using vpl = vc; #define ALL(x) begin(x), end(x) #define RALL(x) (x).rbegin(), (x).rend() constexpr int INF = 1001001001; constexpr long long INFll = 1001001001001001001; template bool chmax(T& a, const T& b) { return a < b ? a = b, 1 : 0; } template bool chmin(T& a, const T& b) { return a > b ? a = b, 1 : 0; } // clang-format on // O(NloglogN) vector prime_table(int n) { assert(n >= 1); if (n == 1) return {}; vector isp((n + 1) >> 1, true); for (int i = 3; i < int(sqrt(n)) + 1; i += 2) if (isp[i >> 1]) for (int j = i * i >> 1; j < int(isp.size()); j += i) isp[j] = false; vector ret({2}); for (int i = 1; i < (n + 1) >> 1; i++) if (isp[i]) ret.push_back((i << 1) + 1); return ret; } template // O(√N) vector> prime_factorize(T N) { vector> ret; for (T b = 2; b * b <= N; ++b) { if (N % b != 0) continue; T e = 0; while (N % b == 0) { e++; N /= b; } ret.push_back({b, e}); } if (N != 1) ret.push_back({N, 1}); return ret; } int main() { cin.tie(0); ios::sync_with_stdio(false); ll N; cin >> N; auto pf = prime_factorize(N); debug(pf); if (pf.size() <= 2) { cout << "Yes" << endl; } else { cout << "No" << endl; } return 0; }