A = list(map(int, input().split()))
L = []
for i in A:
  if i not in L:
    L.append(i)
if len(L) == 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 L = [] L [] for i in A:
  if i not in L:
    L.append(i) i A if i not in L:
    L.append(i) i not in L i L L.append(i) L.append L append i if len(L) == 2:
  print('Yes')
else:
  print('No') len(L) == 2 len(L) len L 2 print('Yes') print 'Yes' print('No') print 'No' A = list(map(int, input().split())) list(map(int, input().split())) A L = [] [] L
A = list(map(int, input().split()))
L = []
for i in A:
  if i not in L:
    L.append(i)
if len(L) == 2:
  print('Yes')
else:
  print('No')