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