x,y,z,w = eval(input())



l = []

l.append(x)

l.append(y)

l.append(z)

l.append(w)

new_l = sorted(l)



if new_l[0] == new_l[1] and new_l[1] != new_l[2] and new_l[2] == new_l[3]:

    print("Yes")

else:

    print("No")
S = eval(input())



S = sorted(S)



if S[0] == S[1] and S[2] == S[3] and S[1]!= S[2]:

    print("Yes")

else:

    print("No")
x, y, z, w = eval(input())
l = []
l.append(x)
l.append(y)
l.append(z)
l.append(w)
new_l = sorted(l)
if new_l[0] == new_l[1] and new_l[1] != new_l[2] and new_l[2] == new_l[3]:
    print("Yes")
else:
    print("No")

S = eval(input())
S = sorted(S)
if S[0] == S[1] and S[2] == S[3] and S[1] != S[2]:
    print("Yes")
else:
    print("No")

-x, y, z, w = eval(input()) -l = [] -l.append(x) -l.append(y) -l.append(z) -l.append(w) -new_l = sorted(l) -if new_l[0] == new_l[1] and new_l[1] != new_l[2] and new_l[2] == new_l[3]: +S = eval(input()) +S = sorted(S) +if S[0] == S[1] and S[2] == S[3] and S[1] != S[2]: