#H2026K. Kerfuffle Tiling
Kerfuffle Tiling
Description
You are given an rectangular grid consisting of unit cells. Your task is to tile the entire grid with rectangular tiles. Each tile must cover two unit cells that share a side, and it may be placed either horizontally or vertically.
The tiling must satisfy all of the following conditions:
- The interiors of any two tiles must not overlap.
- Every cell of the grid must be covered by exactly one tile.
- If two distinct tiles share a boundary segment of positive length, that segment must belong to a long side of one tile and a short side of the other tile.
In other words, whenever two tiles touch along their boundaries, two short sides must not touch each other, and two long sides must not touch each other.
Determine whether such a tiling exists.
Input
The only line contains two integers and --- the number of rows and columns of the grid, respectively.
Output
Print YES if a valid tiling exists. Otherwise, print NO.
Constraints
Example
Input
2 2
Output
NO
相关
在下列比赛中: