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

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

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