a=[int(i) for i in input().split()]
if(len(set(a))==2):
    print('Yes')
else:
    print('No') int(i) for i in input().split() for i in input().split() i input().split() ().split () input split for i in input().split() int(i) int i a=[int(i) for i in input().split()] a [int(i) for i in input().split()] if(len(set(a))==2):
    print('Yes')
else:
    print('No') len(set(a))==2 len(set(a)) len set(a) set a 2 print('Yes') print 'Yes' print('No') print 'No' a=[int(i) for i in input().split()] [int(i) for i in input().split()] a
a=[int(i) for i in input().split()]
if(len(set(a))==2):
    print('Yes')
else:
    print('No')