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