atcoder#ARC116C. [ARC116C] Multiple Sequences

[ARC116C] Multiple Sequences

Score : 500500 points

Problem Statement

Given are integers NN and MM. How many sequences AA of NN integers satisfy the following conditions?

  • 1AiM(i=1,2,,N)1 \leq A_i \leq M \left(i = 1, 2, \ldots, N\right)
  • Ai+1A_{i+1} is a multiple of AiA_i. (i=1,2,,N1)\left(i = 1, 2, \ldots, N - 1\right)

Since the answer can be enormous, report it modulo 998244353998244353.

Constraints

  • All values in input are integers.
  • 1N2×1051 \leq N \leq 2 \times 10^5
  • 1M2×1051 \leq M \leq 2 \times 10^5

Input

Input is given from Standard Input in the following format:

NN MM

Output

Print the answer.

3 4
13

Some of the sequences AA satisfying the conditions follow:

  • A=(1,1,4)A = \left(1, 1, 4\right)
  • A=(3,3,3)A = \left(3, 3, 3\right)
  • A=(1,2,4)A = \left(1, 2, 4\right)
20 30
71166
200000 200000
835917264