a,b,c= map(int, input().split())

if (a==b and b==c) or (not a==b and not b==c and not a==c):
  print('No')
else:
  print('Yes') a,b,c= map(int, input().split()) a map(int, input().split()) map int input().split() ().split () input split b c if (a==b and b==c) or (not a==b and not b==c and not a==c):
  print('No')
else:
  print('Yes') (a==b and b==c) or (not a==b and not b==c and not a==c) a==b and b==c a==b a b b==c b c not a==b and not b==c and not a==c not a==b and not b==c not a==b a==b a b not b==c b==c b c not a==c a==c a c print('No') print 'No' print('Yes') print 'Yes' c= map(int, input().split()) map(int, input().split()) c a,b,c= map(int, input().split()) map(int, input().split()) a b,c= map(int, input().split()) map(int, input().split()) b
a,b,c= map(int, input().split())

if (a==b and b==c) or (not a==b and not b==c and not a==c):
  print('No')
else:
  print('Yes')