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

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