PHƯỚC HƯNG OJ · THỬ THÁCH THUẬT TOÁN

#GL0000186. Số ước của hệ số nhị thức (Divisors of Binomial Coefficient)

HỌC THEO LỘ TRÌNH

Bài tập thuộc lộ trình

1 lộ trình

Số ước của hệ số nhị thức (Divisors of Binomial Coefficient)

Divisors of Binomial Coefficient

Source: AtCoder

Version: Phuoc Hung OJ Extended

Problem Statement

For integers N,KN,K satisfying 0≤K≤N0\le K\le N, the binomial coefficient is

(NK)=N!K!(N−K)!.\binom NK=\frac{N!}{K!(N-K)!}.

Find the number of its distinct positive divisors, modulo 998244353998244353. The input NN can be too large to evaluate the factorials directly.

Input

The input contains two integers NN and KK.

Output

Print the number of positive divisors of (NK)\binom NK modulo 998244353998244353.

Subtasks

  • Subtask 1 (20 points): 1≤N≤10001 \le N \le 1000, 0≤K≤min⁡(1000,N)0 \le K \le \min(1000,N).

  • Subtask 2 (30 points): 1≤N≤1000000001 \le N \le 100000000, 0≤K≤min⁡(10000,N)0 \le K \le \min(10000,N).

  • Subtask 3 (50 points): 1≤N≤10000000000001 \le N \le 1000000000000, 0≤K≤min⁡(1000000,N)0 \le K \le \min(1000000,N).

Examples

Example 1

Input

5 2

Output

4

Explanation

The coefficient (52)=10\binom52=10 has four positive divisors: 1,2,5,101,2,5,10.

Example 2

Input

103 3

Output

8

Explanation

The coefficient (1033)=176851\binom{103}{3}=176851 has eight positive divisors.

Example 3

Input

1000000000000 1000000

Output

110520107

Explanation

Factoring the binomial coefficient by its numerator interval and denominator gives 110520107110520107 after reduction modulo 998244353998244353.