eolymp
bolt
Try our new interface for solving problems
Problems

Strong tiling

Strong tiling

Tiling of the rectangle \textbf{m}×\textbf{n} dominoes is called stable, if there is no line intersecting the interior of the rectangle \textbf{m}×\textbf{n} and does not intersect the interior of any of dominoes. For example, shown in the illustration of tiling (a) and (b) - solid, and tiling (c) and (d) - no. \includegraphics{https://static.e-olymp.com/content/17/178c59737c7aeb151e19ee6bd33fd6a1301236f1.jpg} And as there are solid rectangle tilings \textbf{m}×\textbf{n}? \InputFile The first line of two positive integers \textbf{m} and \textbf{n} (\textbf{1} ≤ \textbf{m} ≤ \textbf{8}; \textbf{1} ≤ \textbf{n} ≤ \textbf{16}) --- the width and height of the board. \OutputFile Bring out one number - the number of solid tiles of the rectangle. \textbf{Clarification} We give all solid tiles in a rectangle of \textbf{5}×\textbf{6}: \includegraphics{https://static.e-olymp.com/content/86/8638df0e1f2535572b5969e0689072c6cd8cf2b5.jpg}
Time limit 1 second
Memory limit 256 MiB
Input example #1
1 1
Output example #1
0
Author Michael Dworkin
Source Winter School, Kharkov, 2011, Day 3