Description: There is an n* m lawn (1 <= n, m <= 100), the prairie grass height is 100. Now use mowing the lawn mower to get a variety of patterns. Only horizontally or vertically mower mowing. Each mowing will first set a height higher than the set will then mown grass are cut into high altitude setting height. Such as prairie is 528, set height to 4, after the mown becomes 424.
Now given a pattern, asked if they could put the lawn cut into patterns look.
Input The first line contains two integers n and m.
Next, the n input lines, each containing not more than 100 m a positive integer.
If you can trim an input pattern, the output "YES", otherwise output "NO".
To Search:
File list (Check if you may need any files):
2. 修剪草坪\2. 修剪草坪\2. 修剪草坪.cpp
...........\...........\2. 修剪草坪.vcxproj
...........\...........\2. 修剪草坪.vcxproj.filters
...........\...........\Debug\2. 修剪草坪.obj
...........\...........\.....\............tlog\2. 修剪草坪.lastbuildstate
...........\...........\.....\................\CL.read.1.tlog
...........\...........\.....\................\CL.write.1.tlog
...........\...........\.....\................\link.read.1.tlog
...........\...........\.....\................\link.write.1.tlog
...........\...........\.....\vc120.idb
...........\...........\.....\vc120.pdb
...........\2. 修剪草坪.sdf
...........\2. 修剪草坪.sln
...........\2. 修剪草坪.v12.suo
...........\Debug\2. 修剪草坪.exe
...........\.....\2. 修剪草坪.ilk
...........\.....\2. 修剪草坪.pdb
...........\2. 修剪草坪\Debug\2. 修剪草坪.tlog
...........\...........\Debug
...........\2. 修剪草坪
...........\Debug
2. 修剪草坪