5297: Draw Grids

内存限制:256 MB 时间限制:1.000 S
评测方式:文本比较 命题人:
提交:2 解决:2

题目描述

ZYT and LBC decided to play a game. 

They will alternately do the following operation. 
  • Pick 4 integers a,b,c,d(1≤a,c≤n and  1b,dm) , where ∣a−c∣+∣b−d∣=1 , and draw a straight segment between point (a,b) and point (c,d). The segment shouldn't overlap with a segment that already exists. 
  • In any time, the segments shouldn't form a polygon. That is, there exists no sequence of distinct points (x0,y0),(x1,y1),⋯,(xk−1,yk−1) satisfying for each integer 0≤u<k,there is a segment between (xu,yu) and (x(u+1) mod k,y(u+1) mod k)
The player who can't perform an operation during his move loses. 

Determine whether ZYT can win considering that both players play optimally and ZYT starts. 

输入

The input consists of one line containing two integers n and m.

输出

Print "YES"(without quote) if ZYT can win and "NO"(without quote) if ZYT can't.

样例输入 复制

1 3

样例输出 复制

NO

提示

It is guaranteed that 1≤n,m≤4.