It is required to determine whether the queen on the cell with the specified coordinates (row number and column number) captures the piece on another specified cell.
Input
Four numbers are entered: the coordinates of the queen and the coordinates of the other piece. Coordinates are integers in the range from 1 to 8.
Imprint
It is required to print the word YES if the queen can capture a piece in 1 move, otherwise print the word NO
Examples
# |
Input |
Output |
1 |
1
1
8
1 |
YES |
2 |
3
2
8
3 |
NO |