Determine whether a queen on a square with given coordinates (row and column) attacks a piece on another specified square.
Four numbers are entered: the coordinates of the queen and the coordinates of another piece. Coordinates are integers from 1 to 8.
Output "YES" if the queen can capture the piece in one move, otherwise output "NO".
Input #1
1 1 8 1
Output #1
YES
Input #2
3 2 8 3
Output #2
NO
Sign in to submit your solution and save your progress.