x=list((int(x) for x in input().split()))
if(len(set(x))==2):
    print("Yes")
else:
    print("No") int(x) for x in input().split() for x in input().split() x input().split() ().split () input split for x in input().split() int(x) int x x=list((int(x) for x in input().split())) x list((int(x) for x in input().split())) list (int(x) for x in input().split()) if(len(set(x))==2):
    print("Yes")
else:
    print("No") len(set(x))==2 len(set(x)) len set(x) set x 2 print("Yes") print "Yes" print("No") print "No" x=list((int(x) for x in input().split())) list((int(x) for x in input().split())) x
x=list((int(x) for x in input().split()))
if(len(set(x))==2):
    print("Yes")
else:
    print("No")