Domino 2
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
The rectangular board is given. Some of its cells are cut. Determine is it possible to cover the remaining cells with domino tiles.
Input
The first line contains two integers m and n (1 ≤ m, n ≤ 40) - the dimensions of the board. Each of the next m lines contains n symbols. The i-th character of j-th line equals to "X" (Latin big X), if the cell is cut, and "." (point) if the cell is empty.
Output
Print "YES" if its possible to cover the board with domino tiles, and "NO" otherwise.
Examples
Input #1
Answer #1
Input #2
Answer #2
Submissions 1K
Acceptance rate 26%