#include #include using namespace std; #include using mint = atcoder::modint998244353; int main() { long long N; cin >> N; vector fac; for (long long p = 2; p * p <= N; ++p) { if (N % p != 0) continue; int cnt = 0; while (N % p == 0) { N /= p; ++cnt; } fac.push_back(cnt); } if (N != 1) fac.push_back(1); vector> states; vector tmp(fac.size()); auto rec = [&](auto &&self, int d) -> void { if (d == int(tmp.size())) { states.push_back(tmp); return; } for (int a = 0; a <= fac.at(d); ++a) tmp.at(d) = a, self(self, d + 1); }; rec(rec, 0); vector dp(states.size()); dp.front() = 1; for (int i = 0; i < int(dp.size()); ++i) { for (int j = 0; j < i; ++j) { mint tmp = dp.at(j); for (int d = 0; d < int(fac.size()); ++d) { if (states.at(i).at(d) < states.at(j).at(d)) { tmp = 0; break; } else if (states.at(i).at(d) == states.at(j).at(d)) { tmp *= states.at(i).at(d) + 1; } } dp.at(i) += tmp; } } cout << dp.back().val() << endl; }