Chocolate#1489

Chocolate

1 second
64 megabytes
Easy

Petya and Olena both love chocolate. Recently, Petya bought a chocolate bar and wants to share it with Olena. The chocolate bar is a rectangle of size n \times m, and is entirely made up of small chocolate pieces, each of which is a 2 \times 1 rectangle.

Petya wants to divide the chocolate bar into two parts by breaking it along a line parallel to one of its edges. Neither Petya nor Olena likes broken pieces, so Petya wants to make sure that the chocolate bar is broken in such a way that no piece is damaged.

Help Petya share the chocolate with Olena.

Input

The first line contains two integers and (1 \leq n, m \leq 20; at least one of or is even). Then lines follow, each containing numbers — the number of the piece that the corresponding chocolate cell belongs to. The pieces are numbered from to (n \cdot m) / 2, and no two pieces have the same number.

Output

Print "Yes" if Petya can break the chocolate bar without damaging any pieces. Otherwise, print "No".

Examples

Example 1

Loading
Loading