A,B,C = map(int,input().split())

if A==B and B==C and A==C:
  print ("No")
elif A!=B and B!=C and 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 and A==C:
  print ("No")
elif A!=B and B!=C and A!=C:
  print ("No")
else :
  print ("Yes") A==B and B==C and A==C A==B and B==C A==B A B B==C B C A==C A C print ("No") print "No" elif A!=B and B!=C and A!=C:
  print ("No") A!=B and B!=C and A!=C A!=B and B!=C A!=B A B B!=C B C A!=C A C print ("No") print "No" print ("Yes") print "Yes" C = map(int,input().split()) map(int,input().split()) C B,C = map(int,input().split()) map(int,input().split()) B A,B,C = map(int,input().split()) map(int,input().split()) A
A,B,C = map(int,input().split())

if A==B and B==C and A==C:
  print ("No")
elif A!=B and B!=C and A!=C:
  print ("No")
else :
  print ("Yes")