#pragma GCC optimize("O3")

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;
#define TIME (clock() * 1.0 / CLOCKS_PER_SEC)

const int M = 5e7 + 239;
const int X = 4e6 + 239;
const int MOD = 998244353;

int mul(int a, int b) {
    return 1LL * a * b % MOD;
}

int sum(int a, int b) {
    a += b - MOD;
    a += (a >> 31) & MOD;
    return a;
}

int power(int a, int k) {
    int ans = 1;
    int pw = a;
    while (k) {
        if (k & 1) {
            ans = mul(ans, pw);
        }
        pw = mul(pw, pw);
        k >>= 1;
    }
    return ans;
}

int primes[X], cnt_primes;
int f[M], mn[M], cnt[M];
int inv[30];

int main() {
#ifdef ONPC
    freopen("input", "r", stdin);
#endif
    ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
    for (int i = 0; i < 30; i++) {
        inv[i] = power(i, MOD - 2);
    }

    int n, c;
    cin >> n >> c;

    memset(f, -1, sizeof(f));
    cnt_primes = 0;
    int ans = 0;
    f[1] = 1;
    mn[1] = 0;
    for (int i = 1; i <= c; i++) {
        if (f[i] == -1) {
            f[i] = n;
            primes[cnt_primes++] = i;
            mn[i] = i;
            cnt[i] = 1;
        }
        ans = sum(ans, f[i]);
        for (int j = 0; j < cnt_primes && primes[j] <= mn[i] && primes[j] * i <= c; j++) {
            int nw = primes[j] * i;
            mn[nw] = primes[j];
            if (i % primes[j] == 0) {
                cnt[nw] = cnt[i] + 1;
            } else {
                cnt[nw] = 1;
            }
            f[nw] = mul(f[i], n + cnt[nw] - 1);
            if (cnt[nw] > 1) {
                f[nw] = mul(f[nw], inv[cnt[nw]]);
            }
        }
    }
    cout << ans << "\n";

    return 0;
}
