cho.sh
Notes
Loading...

Tiling a Grid

Time limit

2s

Memory limit

128 MB

Problem

There is a rectangular grid with N rows and M columns. Fill the entire grid with 2x1 dominoes without leaving any empty cells. A domino may also be rotated and placed as 1x2.

Given N and M, compute the number of ways to tile the grid with dominoes.

Input

The first line contains two integers N and M.

Output

Print the number of ways to tile the grid without empty cells, modulo 9901.

Constraints

  • 1 ≤ N, M ≤ 14