#36Easy
Chessboard colours
Time: 1 s · Memory: 256 MB
- Conditionals
Statement
The files (columns) and ranks (rows) of a chessboard are numbered from to ; square is black. Two squares are given: and . Are they the same colour?
Input format
A single line with four integers , , , ().
Output format
YES if the squares are the same colour, NO otherwise.
Examples
Input
1 1 2 2
Output
YES
Input
1 1 1 2
Output
NO
Note
Neighbouring squares alternate colours, so a square's colour is given by the parity of : even means black.
