Jump and turn
시간 제한1초메모리 제한512 MB
n x m 격자의 모든 칸을 정확히 한 번씩 방문하되, 연속한 세 방문 칸의 중심이 엄격히 왼쪽으로 꺾이도록 순서를 정한다.
문제
Vanya is now sleeping and in the dream he's standing on grid of size . He wants to visit every cell of grid exactly once.
Vanya can initialy stand in the center of any cell and then he can jump from the cell he's standing on now to any other cell. Every time Vanya jumps exactly to the center of cell.
Vanya can jump from any cell to any other cell but there's a problem. Every time after jump he must turn strictly left. Specifically any three cells Vanya visit successively must satisfy following: if stand in the center of first cell and look at center of second cell then center of third cell must be in the left half-plane excluding line between centers of first and second cells. Particularly centers of three successively visited cells must not lie on one straight line.
Columns of grid are numbered from left to right from to . Rows of grid are numbered from bottom to top from to .
Help Vanya to find a way to visit every cell exactly once and satisfy the condition or report if it's impossible.
입력
Single line contains two integers and --- amount of columns and rows ().
출력
In first line output <<Yes>> if it is possible to visit every cell as described, output <<No>> otherwise.
If solution exists output more lines, -th of them contains two integers and --- numbers of column and row which contains a cell Vanya should visit on -th step (, ).
힌트

Explanation for the first test

Explanation for the second test