A,B,C = sorted(list(map(int,input().split())))



if A==B and B==C:

  print("No")

elif A==B or B==C:

  print("Yes")

else:

  print("No")
if len(set(map(int,input().split())))==2:

  print("Yes")

else:

  print("No")
A, B, C = sorted(list(map(int, input().split())))
if A == B and B == C:
    print("No")
elif A == B or B == C:
    print("Yes")
else:
    print("No")

if len(set(map(int, input().split()))) == 2:
    print("Yes")
else:
    print("No")

-A, B, C = sorted(list(map(int, input().split()))) -if A == B and B == C: -    print("No") -elif A == B or B == C: +if len(set(map(int, input().split()))) == 2: