dic = {}
for i in input().split():
  dic[i] = 0
if len(dic) == 2:
  print('Yes')
else:
  print('No') dic = {} dic {} for i in input().split():
  dic[i] = 0 i input().split() ().split () input split dic[i] = 0 dic[i] dic i 0 if len(dic) == 2:
  print('Yes')
else:
  print('No') len(dic) == 2 len(dic) len dic 2 print('Yes') print 'Yes' print('No') print 'No' dic = {} {} dic
dic = {}
for i in input().split():
  dic[i] = 0
if len(dic) == 2:
  print('Yes')
else:
  print('No')