x = [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 = [int(x) for x in input().split()] x [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 = [int(x) for x in input().split()] [int(x) for x in input().split()] x
x = [int(x) for x in input().split()]
if (len(set(x))==2):
      print('Yes')
else:
      print('No')