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