#include #include using namespace std; using namespace atcoder; #define rep(i,n) for(int i = 0; i < n; i++) #define all(a) a.begin(),a.end() #define SORT(a) sort(all(a)); #define MIN(a) *min_element(all(a)) #define MAX(a) *max_element(all(a)) #define SUM(a) accumulate(all(a),0LL) using ll=long long; using ld=long double; using ull=unsigned long; ll MOD=998244353; using mint = static_modint<998244353>; const int dx[]={0,1,0,-1,1,-1,1,-1};const int dy[]={1,0,-1,0,1,1,-1,-1}; const string ALPHA="ABCDEFGHIJKLMNOPQRSTUVWXYZ";const string alpha="abcdefghijklmnopqrstuvwxyz"; long long partition(int n) { vector p(n + 1, 0); p[0] = 1LL; // 空の和の方法が1つ(何も選ばない) for (int k = 1; k <= n; ++k) { for (int i = k; i <= n; ++i) { p[i] += p[i - k]; } } return p[n]; } vector> prime_factors(long long n) { vector> factors; // 2で割れるだけ割る while (n % 2 == 0) { if (factors.empty() || factors.back().first != 2) { factors.push_back({2, 0}); } factors.back().second++; n /= 2; } // 3以上の奇数で割り続ける for (long long i = 3; i * i * i <= n; i += 2) { while (n % i == 0) { if (factors.empty() || factors.back().first != i) { factors.push_back({i, 0}); } factors.back().second++; n /= i; } } // nが素数の場合 if (n > 1) { factors.push_back({n, 1}); } return factors; } int main(){ cin.tie(nullptr); cout.tie(nullptr); ios::sync_with_stdio(false); ll n;cin>>n; int ans=1; vector> factors = prime_factors(n); for(ll i=0;i