# unit URL: https://stepik.org/lesson/265083/step/15?thread=solutions&unit=246031

a, b, c, d = int(input()), int(input()), int(input()), int(input())
if (-1 <= a - c <= 1) and (-1 <= b - d <= 1):
    print('YES')
else:
    print('NO')