E. Busy Beaver's Water Network
time limit per test
2 seconds
memory limit per test
1024 megabytes
input
standard input
output
standard output

Busy Beaver has taken on a new engineering challenge: designing a water distribution system for his growing beaver colony. The system will consist of $$$N$$$ water stations (nodes) connected by pipes (edges), where no pipe connects a station to itself and no two stations have more than one pipe between them. As a careful planner, Busy Beaver ensures the entire system is connected; that is, water can flow from any station to any other through some series of pipes.

Busy Beaver wants his system to be resilient: no matter which spanning tree of pipes is chosen to serve as the active network, there must always be at least one main station, a node with degree at least $$$K$$$ in that tree, where $$$\frac{N + 3}{2} \le K \lt N$$$.

How many distinct connected pipe networks on $$$N$$$ labeled stations satisfy this condition? Two networks are considered distinct if they differ by at least one pipe. Since the answer may be enormous, output it modulo $$$998\,244\,353$$$.

Input

The input contains two integers $$$N$$$ and $$$K$$$ ($$$5 \le N \le 5000$$$, $$$\frac{N + 3}{2} \le K \lt N$$$).

Output

Output a single integer — the number of connected graphs satisfying the condition, modulo $$$998\,244\,353$$$.

Scoring

There are four subtasks for this problem.

  • ($$$10$$$ points): $$$N\le 7$$$.
  • ($$$20$$$ points): $$$K \ge \max(N - 5,\frac{N + 3}{2})$$$.
  • ($$$50$$$ points): $$$N \le 200$$$.
  • ($$$20$$$ points): No additional constraints.
Examples
Input
7 5
Output
322
Input
50 28
Output
360690501