x, y, z, h = map(int, input(). split())

if x == z and y == h:
    print("YES")
else:
    print("NO")