Олимпиадный тренинг

Задача 39535. hungry pawn


Gromozeka respects chessboard games. Gromozeka has a hungry pawn on a regular 8x8 board. A hungry pawn eats some opponent’s piece every move (i.e. it can move diagonally forward 1 square to the right or left, it cannot move back). Gromozeka, without looking at the board, learned to determine whether a hungry pawn can move from one square of the board to another. It is impossible to turn into a queen to a hungry pawn.
Write a program with which you could also easily check Gromozeka.

Input
The program receives as input two cells of the chessboard in chess notation. First, the cell where the hungry pawn stands, and then, after a gap, the cell where the hungry pawn must go.

Imprint
Print the word YES (in capital letters) if a hungry pawn can move from the first cell to the second, and NO otherwise.
The board has a size of 8x8, the verticals are numbered in small Latin letters from a to h, the horizontals are numbered from 1 to 8. The starting and ending cells do not match.
 
Examples
# Input Output
1 a1 b2 YES
2 b2 a1 NO
3 a1 h7 NO