Same Color Squares
Are the two squares (r1, c1) and (r2, c2) the same color on a standard chessboard coloring?
Input: one line with four integers r1 c1 r2 c2.
Output: YES or NO.
Constraints:
- 1 ≤ coordinates ≤ 109
Sample Tests
Input 1
1 1 2 2
Output 1
YES
Input 2
1 1 1 2
Output 2
NO
Discussion (opens after you solve — no spoilers before)
No comments yet.