x=list(map(int,input().split()))
t=0
for i in range(1,10):
    s=0
    s=x.count(i)
    t+=s
    if s==2:
        print("Yes")
        break
    if t==3:
        print("No")
        break x=list(map(int,input().split())) x list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split t=0 t 0 for i in range(1,10):
    s=0
    s=x.count(i)
    t+=s
    if s==2:
        print("Yes")
        break
    if t==3:
        print("No")
        break i range(1,10) range 1 10 s=0 s 0 s=x.count(i) s x.count(i) x.count x count i t+=s t s if s==2:
        print("Yes")
        break
     s==2 s 2 print("Yes") print "Yes" break if t==3:
        print("No")
        break t==3 t 3 print("No") print "No" break x=list(map(int,input().split())) list(map(int,input().split())) x s=x.count(i) x.count(i) s s=0 0 s t+=s s t t=0 0 t
x=list(map(int,input().split()))
t=0
for i in range(1,10):
    s=0
    s=x.count(i)
    t+=s
    if s==2:
        print("Yes")
        break
    if t==3:
        print("No")
        break