-->
当前位置:首页 > 题库

PROGRAMMING:Little pony

Luz5年前 (2021-05-10)题库514
Given a chessboard, it is known that the number of rows and columns of the chessboard is $$n, M $$, and there is a candy at each integer coordinate, $$Keven $$. In the lower left corner of the chessboard, $(1,1) $(see Note 1 for details), $$Keven $$can only jump "day" every time (see Note 2 for details). Suppose that $$Keven $$can jump countless times, but can't jump out of the chessboard, Now $$Keven $$wants to know if he can get $$n * m $$candies
###Input format:
In a row, give two numbers $$n, M $$, indicating the size of the chessboard
###Output format:
If $$Keven $$can get $$n * m $$candies, output "yes"; otherwise, output "no"“
###Input example:
```in
4 4
```
###Output example:
```out
Yes
```
###Tips:
1. If given $$n = 3, M = 3 $$, the chessboard is as shown in the figure, $$Keven $$starts at the red point of $$(1,1) $$in the lower left corner. At this time, $$Keven $$can reach all points except the middle point $$(2,2) $

2. Suppose that $$Keven $$is now on the yellow dot, then he can jump to the eight red dots in the figure








answer:If there is no answer, please comment