Given an $n \times m$ matrix consisting of 0 and 1, representing a pixel image. You need to determine whether this pixel image forms the digit "8".
The pixel image represents the digit "8" if and only if both of the following conditions hold:
All pixels with value
1form exactly one 4-connected component.Inside that connected component of
1s, there are exactly two "holes".
Here, a "hole" is defined as a 4-connected component of 0s that satisfies:
- The component is completely surrounded by
1s (that is, all pixels adjacent to it from outside are1s), and it does not touch the boundary of the matrix.
Note: Two pixels are adjacent in the 4-connected sense if and only if they are adjacent in one of the four directions: up, down, left, or right.
Input
The first line contains two positive integers $n,m$ $(1\le n,m\le 1000)$.
The next $n$ lines each contain $m$ integers, each either 0 or 1, describing the matrix.
Output
If the matrix is "8", output a single line containing the string This is eight. (without quotes).
If the matrix is not "8", output a single line containing the string I don't know what this number is. (without quotes).
Examples
Input 1
9 5 0 1 1 1 0 1 1 0 1 1 1 0 0 0 1 1 1 0 1 1 0 1 1 1 0 1 1 0 1 1 1 0 0 0 1 1 1 0 1 1 0 1 1 1 0
Output 1
This is eight.
Input 2
5 3 1 1 1 1 0 1 0 1 0 1 0 1 1 1 1
Output 2
I don't know what this number is.
Input 3
7 7 1 1 1 1 1 1 1 1 0 0 0 0 0 1 1 0 1 1 1 0 1 1 0 1 0 1 1 1 1 0 1 1 1 0 1 1 0 0 0 0 0 1 1 1 1 1 1 1 1
Output 3
This is eight.