传统题 1000ms 512MiB

Kerfuffle Tiling

该比赛已结束,您无法在比赛模式下递交该题目。您可以点击“在题库中打开”以普通模式查看和递交本题。

Description

You are given an n×mn \times m rectangular grid consisting of unit cells. Your task is to tile the entire grid with 1×21 \times 2 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 nn and mm --- the number of rows and columns of the grid, respectively.

Output

Print YES if a valid tiling exists. Otherwise, print NO.

Constraints

1n,m109.1 \le n,m \le 10^9.

Example

Input

2 2

Output

NO

Hello ACM 2026

未参加
状态
已结束
规则
ACM/ICPC
题目
13
开始于
2026-8-15 13:00
结束于
2026-8-15 18:00
持续时间
5 小时
主持人
参赛人数
31