# x,y=(input()).split(" ")
# x=int(x)
# y=int(y)
# print(x+y)
# print((int(input()))+3)
a,b,c,d=map(int, input().split(" "))
if a==b and c==d:
print("YES")
elif a==c and b==d:
print("YES")
elif a==d and b==c:
print("YES")
else:
print("NO")