Jumps with a turn
Vanya dreams of standing on a checkered field of size n * m, and he wants to visit every cell of this field exactly once.
Vanya can start in the center of any cell and jump from one cell to another. After each jump, he lands in the center of the new cell.
While Vanya can jump from any cell to any other, there is a catch. After each jump, he must turn strictly to the left. Specifically, for any three consecutive cells that Vanya visits, the following condition must be satisfied: if you look from the center of the first cell towards the center of the second cell, then the center of the third cell must lie in the left half-plane, excluding the line itself between the centers of the first and second cells. In particular, the centers of three consecutive cells should not be collinear.
The columns of the field are numbered from left to right from 1 to n, and the rows are numbered from bottom to top from 1 to m. Help Vanya find a way to visit all the cells, or determine that it is impossible.
Input
The only line contains two integers n and m—the number of columns and rows (1 ≤ n, m ≤ 100).
Output
On the first line, print "Yes" if it is possible to visit all the cells in the described manner; otherwise, print "No".
If a solution exists, print n * m lines. On the i-th line, print two integers x[i]
and y[i]
— the column number and the row number of the cell Vanya should jump to on the i-th step (1 ≤ x[i] ≤ n, 1 ≤ y[i] ≤ m)
.