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