#include #include #include using namespace std; using ll = long long; using mint = atcoder::modint998244353; int main() { ll N; cin >> N; vector factor; { // 素因数分解 for(ll p = 2; p * p <= N; p++) if(N % p == 0) { N /= p; factor.push_back(1); while(N % p == 0) { N /= p; factor.back()++; } } if(N > 1) factor.push_back(1); } const int size = [&]{ int size = 1; for(int f : factor) size *= f + 1; return size; }(); vector dp(size); auto at = [&](vector index) -> mint& { int i = 0; for(int k = 0; k < factor.size(); k++) { i *= factor[k] + 1; i += index[k]; } return dp[i]; }; dp[0] = 1; auto next_index = [&](vector& index, const vector& zero) { for(int k = factor.size(); ; ) { if(--k < 0) { index.clear(); return; } if(index[k] == factor[k]) { index[k] = zero[k]; continue; } index[k]++; return; } }; const vector zero(factor.size(), 0); for(auto I = zero; I.size(); next_index(I, zero)) { const mint dp1 = at(I); for(auto J = I; (void)next_index(J, I), J.size(); ) { mint x = dp1; for(int k = 0; k < factor.size(); k++) { if(J[k] == I[k]) x *= mint::raw(I[k] + 1); } at(J) += x; } } cout << dp.back().val() << endl; }