
You need to determine if a rook, positioned on a cell with specific coordinates (row and column numbers), can attack another piece located on a different cell.
You will be given four numbers: the coordinates of the rook (two numbers) and the coordinates of the other piece (two numbers). Each number is provided on a separate line.
Vasya, the boy who created this puzzle, hasn't learned chess notation yet. Therefore, he describes the positions of the pieces using his own system, which resembles the way points are positioned in the st quadrant of a coordinate plane rather than traditional chess notation.
Print "YES" if the rook can attack the piece; otherwise, print "NO".
Example 1
Example 2