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