#include #include using namespace std; using ll = long long; using mint = atcoder::modint998244353; int main(){ ios::sync_with_stdio(false); cin.tie(0); vector dp = {0,6,21,55,120,231,406,666,1035,1540,2211,3081,4186,5565,7260,9316,11781,14706,18145,22155}; constexpr int th = 1'000'000; vector cnt(th + 1); vector ans(th + 1, mint::raw(1)); for(int i = 2; i <= th; i++){ if(cnt[i]) continue; if(i > 1000){ for(int j = i; j <= th; j += i){ cnt[j] = 1; ans[j] *= dp[1]; } }else{ for(int j = i; j <= th; j += i) cnt[j] = 1; int v = i * i; while(v <= th){ for(int j = v; j <= th; j += v) cnt[j]++; v *= i; } for(int j = i; j <= th; j += i) ans[j] *= dp[cnt[j]]; } } int T; cin >> T; while(T--){ int v; cin >> v; cout << ans[v].val() << '\n'; } }