Module: (C++) Nested conditional statement. Difficult conditions


Problem

10 /14


Programming the Queen

Problem

No one has yet made statistics on how many programmers can play chess well (at least at the level of the first rank). But we can definitely say that any programmer at least once tried to write a program related to chess in one way or another. Let's try it too.
It is required to determine whether the queen standing on a cell with the specified coordinates (row number and column number) can beat a piece standing on another specified cell.
 

Input
Four numbers are entered: the coordinates of the queen and the coordinates of the other piece. Coordinates are integers between 1 and 8.

Imprint 
It is required to output the word YES if the queen can capture a piece in 1 move, otherwise output the word NO.

 

Examples
# Input Output
1 1
1
8
1
YES
2 3
2
8
3
NO