Author: | Антон Карабанов | Time limit: | 1 sec | |
Input file: | Standard input | Memory limit: | 512 Mb | |
Output file: | Standard output |
Fantasy chess is a variant of chess composition. Puzzles of this variant contain changes to some of the accepted rules of the game or utilize unusual pieces or boards.
Amazon is a fantasy chess piece which can move as either a queen or a knight. It is usually represented on diagrams as a horse with the crown. You can see all possible moves of this piece on a picture below. Amazon is so strong and independent that it can checkmate the enemy king without the help of another friendly piece.
White amazon and black king are positioned on a normal chess board. Determine whether the king is checkmated.
First line of input contains two integers separated by space: x1 and y1 — coordinates of the white amazon. Second line contains coordinates of the black king x2 and y2 in the same format. Piece positions are guaranteed to be different.
Output Yes
or No
— answer to the problem's question.
1 ≤ x1, x2, y1, y2 ≤ 8
See the picture. In the second sample the king can capture the amazon.
No. | Standard input | Standard output |
---|---|---|
1 |
|
|
2 |
|
|