Chocolate
Petya and Masha both have a great love for chocolate. Recently, Petya purchased a chocolate bar and now wishes to share it with Masha. The chocolate bar is a rectangle with dimensions ( n m ), composed entirely of small chocolate pieces, each measuring ( 2 1 ).
Petya plans to divide the chocolate bar into two parts by breaking it along a line parallel to one of its edges. However, neither Petya nor Masha likes broken pieces, so Petya wants to ensure that the chocolate bar is split without damaging any pieces.
Your task is to help Petya share the chocolate bar with Masha without breaking any pieces.
Input
The first line of the input contains two integers ( n ) and ( m ) (( 1 n, m 20 ); at least one of these numbers is even). The next ( n ) lines each contain ( m ) numbers, representing the piece numbers that each part of the chocolate bar belongs to. The pieces are numbered from 1 to ((n m)/2), and each piece has a unique number.
Output
Print "Yes" if Petya can break the chocolate bar without damaging any pieces. Otherwise, print "No".