1848 找MM


Submit solution

Points: 100
Time limit: 1.0s
Memory limit: 32M

Problem types
Allowed languages
C, C++, Java, Python

Description

用心找MM吧。 输入一副图,问你能否在图中找到一个M样子的由!构成的图 图的标准样子如下(大小固定),图只由!和.构成

!.....!

!!...!!

!.!.!.!

!..!..!

Input

多组数据 每组输入2个整数n,m(1=<n,m<=100),n表示有几行,m表示有几列。 接下来n行字符串,每个字符串共有m个字符,字符只包括!和.

Output

如果有M字样,那么输出yes,否则输出no

Sample

Input

4 7
!.!!!.!
!!...!!
!.!.!.!
!..!..!
4 7
!.....!
!....!!
!.!.!.!
!..!..!
3 5
!...!
!!.!!
!.!.!

Output

yes
no
no

Source: Y.uan


Comments

There are no comments at the moment.