#ABC155
s = input().split()
print("Yes" if len(set(s))==2 else "No") s = input().split() s input().split() ().split () input split print("Yes" if len(set(s))==2 else "No") print "Yes" if len(set(s))==2 else "No" len(set(s))==2 len(set(s)) len set(s) set s 2 "Yes" "No" s = input().split() input().split() s
#ABC155
s = input().split()
print("Yes" if len(set(s))==2 else "No")