def main():
    n, m = map(int, input().split())
    assert n <= 200000 and m <= 200000

    count_divisors = [0] * (m + 1)
    for i in range(1, m + 1):
        for j in range(i, m + 1, i):
            count_divisors[j] += 1

    mod = 998244353
    count_lcm = [pow(count_divisors[l], n, mod) for l in range(m + 1)]
    for i in range(1, m + 1):
        for j in range(i + i, m + 1, i):
            count_lcm[j] -= count_lcm[i]

    ans = 0
    for l in range(1, m + 1):
        ans += (m // l) * count_lcm[l] % mod
        ans %= mod
    print(ans)


if __name__ == "__main__":
    main()