number=list(map(int,input().split()))
for i in range(1,10):
    if number.count(i)==2:
        print("Yes")
        exit(0)
print("No") number=list(map(int,input().split())) number list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split for i in range(1,10):
    if number.count(i)==2:
        print("Yes")
        exit(0) i range(1,10) range 1 10 if number.count(i)==2:
        print("Yes")
        exit(0) number.count(i)==2 number.count(i) number.count number count i 2 print("Yes") print "Yes" exit(0) exit 0 print("No") print "No" number=list(map(int,input().split())) list(map(int,input().split())) number
number=list(map(int,input().split()))
for i in range(1,10):
    if number.count(i)==2:
        print("Yes")
        exit(0)
print("No")