Under construction

Still being built. Things may change

Rampant Growth

Time limit1sMemory limit2048 MB

Summary
Count the ways to place exactly one plant per column in an r by c grid so that plants in adjacent columns sit in different rows, modulo 998244353.
Level

Easy2 of 10

Topics
Math, Combinatorics
Solved
No attempts yet

Problem

Eddy is planning his garden, which is a grid. He wants exactly one plant in each column. To keep the plants from competing for resources, plants in adjacent columns must be in different rows.

Count the number of ways Eddy can place plants in his garden under these conditions. Two ways differ if some square has a plant in one arrangement but not in the other. Output the count modulo 998 244 353998\,244\,353.

Input

The single line of input contains two space-separated integers rr and cc (1≤r,c≤501 \leq r,c\leq 50), where rr is the number of rows in Eddy's garden grid and cc is the number of columns.

Output

Output a single integer, the number of ways Eddy can place plants in his garden, modulo 998 244 353998\,244\,353.

Examples3

  1. Example 1

    Input
    3 2
    
    Expected output
    6
    
  2. Example 2

    Input
    1 5
    
    Expected output
    0
    
  3. Example 3

    Input
    42 25
    
    Expected output
    722210361