a = list(map(int, input().split()))
s = set()
for x in a:
  s.add(x)
if len(s) == 2:
  print('Yes')
else:
  print('No') a = list(map(int, input().split())) a list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split s = set() s set() set for x in a:
  s.add(x) x a s.add(x) s.add s add x if len(s) == 2:
  print('Yes')
else:
  print('No') len(s) == 2 len(s) len s 2 print('Yes') print 'Yes' print('No') print 'No' s = set() set() s a = list(map(int, input().split())) list(map(int, input().split())) a
a = list(map(int, input().split()))
s = set()
for x in a:
  s.add(x)
if len(s) == 2:
  print('Yes')
else:
  print('No')