A,B,C = map(int,input().split())
ans = "No"
if A == B and A != C:
  ans = "Yes"
elif B == C and B != A:
  ans = "Yes"
elif C == A and C != B:
  ans = "Yes"
print(ans) A,B,C = map(int,input().split()) A map(int,input().split()) map int input().split() ().split () input split B C ans = "No" ans "No" if A == B and A != C:
  ans = "Yes"
elif B == C and B != A:
  ans = "Yes"
elif C == A and C != B:
  ans = "Yes" A == B and A != C A == B A B A != C A C ans = "Yes" ans "Yes" elif B == C and B != A:
  ans = "Yes" B == C and B != A B == C B C B != A B A ans = "Yes" ans "Yes" elif C == A and C != B:
  ans = "Yes" C == A and C != B C == A C A C != B C B ans = "Yes" ans "Yes" print(ans) print ans A,B,C = map(int,input().split()) map(int,input().split()) A ans = "No" "No" ans ans = "Yes" "Yes" ans B,C = map(int,input().split()) map(int,input().split()) B ans = "Yes" "Yes" ans ans = "Yes" "Yes" ans C = map(int,input().split()) map(int,input().split()) C
A,B,C = map(int,input().split())
ans = "No"
if A == B and A != C:
  ans = "Yes"
elif B == C and B != A:
  ans = "Yes"
elif C == A and C != B:
  ans = "Yes"
print(ans)