// No.36 素数が嫌い! #include #include using namespace std; typedef long long ll; int main() { ll N; cin >> N; map mp; for (int i = 2; (ll)i * i <= N; ++i) { if (N % i) continue; while (N % i == 0) { N /= i; mp[i]++; } } if (N != 1) mp[N]++; bool judge = false; if (mp.size() > 2) judge = true; else { for (auto [key, val]: mp) { if (val > 1) judge = true; } } if (judge) cout << "YES" << endl; else cout << "NO" << endl; }