## DP Finite Automata with Compression: Corn Yard

Farmer John’s land is owned by M× N Composed of a small square, and now he wants to grow corn in the land.

Unfortunately, part of the land is sterile and cannot be planted.

Moreover, adjacent land cannot be planted with corn at the same time, which means that there is no common edge between all the squares where corn is planted.

Now given the size of the land, please find out how many planting methods there are.

Planting nothing on the land is a method.

Input format

First 1 Line contains two integers M with N.

First 2.. M+ 1 Rows: each row contains N Integers 0 or 1, Used to describe the condition of the entire land,1 It means that the land is fertile,0 Indicates that the land is sterile.

Output format Output total planting methods in the modulo 10^8.

data range 1 ≤ M, N≤ 12

Sample Input:

2 3
1 1 1
0 1 0


Sample Output:

9


### Solution

We use an integer j to represent row i’s corn plant. A k-th bit 1 in j represent a corn is planted in column k of row i. dp[i][j]: The corn plating methods for up to i-th row and the status of the i-th row is j.