Rook

Problem Statement

Determine whether a rook on a square with given coordinates (row and column) attacks a piece on another specified square.

Input

Four numbers are entered: the coordinates of the rook (two numbers) and the coordinates of another piece (two numbers), each on a separate line. Coordinates are integers from 1 to 8.

Output

Output "YES" if the rook can capture the piece in one move, otherwise output "NO".

Example

[{'input': '1\n1\n2\n2', 'output': 'NO'}, {'input': '1\n1\n2\n1', 'output': 'YES'}]