A particularly interesting math problem catches your eye! The problem is asking about an
You are trying to see what kind of colourings of the
Given a colouring of an
Clarification: These four distinct black squares must be exactly the four corners of the rectangle they form.
Constraints
Subtask 1 [20%]
Subtask 2 [30%]
Subtask 3 [50%]
Input Specification
The first line will contain two space-separated integers,
The next .
representing a white tile, or a #
representing a black tile.
Output Specification
Output the answer on a single line. This answer should be yes
if this colouring does not have a rectangle formed by four black squares. Otherwise, output no
.
Sample Input 1
3 4
#.##
##..
..##
Sample Output 1
no
Sample Input 2
1 4
####
Sample Output 2
yes
Comments