#ARC144D. [ARC144D] AND OR Equation

[ARC144D] AND OR Equation

Score : 700700 points

Problem Statement

You are given positive integers NN and KK. Find the number, modulo 998244353998244353, of integer sequences (f(0),f(1),,f(2N1))\bigl(f(0), f(1), \ldots, f(2^N-1)\bigr) that satisfy all of the following conditions:

  • 0f(x)K0\leq f(x)\leq K for all non-negative integers xx (0x2N10\leq x \leq 2^N-1).
  • $f(x) + f(y) = f(x \,\mathrm{AND}\, y) + f(x \,\mathrm{OR}\, y)$ for all non-negative integers xx and yy (0x,y2N10\leq x, y \leq 2^N-1)

Here, AND\mathrm{AND} and OR\mathrm{OR} denote the bitwise AND and OR, respectively.

Constraints

  • 1N3×1051\leq N\leq 3\times 10^5
  • 1K10181\leq K\leq 10^{18}

Input

Input is given from Standard Input in the following format:

NN KK

Output

Print the number, modulo 998244353998244353, of integer sequences that satisfy the conditions.

2 1
6

The following six integer sequences satisfy the conditions:

  • (0,0,0,0)(0,0,0,0)
  • (0,1,0,1)(0,1,0,1)
  • (0,0,1,1)(0,0,1,1)
  • (1,0,1,0)(1,0,1,0)
  • (1,1,0,0)(1,1,0,0)
  • (1,1,1,1)(1,1,1,1)
2 2
19
100 123456789123456789
34663745