a1,b1=map(int,input().split())
a2,b2=map(int,input().split())
a3,b3=map(int,input().split())
temp=[a1,a2,a3,b1,b2,b3]
t1=temp.count(1)
t2=temp.count(2)
t3=temp.count(3)
t4=temp.count(4)
if max(t1,t2,t3,t4)==2:
  print("YES")
else:
  print("NO") a1,b1=map(int,input().split()) a1 map(int,input().split()) map int input().split() ().split () input split b1 a2,b2=map(int,input().split()) a2 map(int,input().split()) map int input().split() ().split () input split b2 a3,b3=map(int,input().split()) a3 map(int,input().split()) map int input().split() ().split () input split b3 temp=[a1,a2,a3,b1,b2,b3] temp [a1,a2,a3,b1,b2,b3] a1 a2 a3 b1 b2 b3 t1=temp.count(1) t1 temp.count(1) temp.count temp count 1 t2=temp.count(2) t2 temp.count(2) temp.count temp count 2 t3=temp.count(3) t3 temp.count(3) temp.count temp count 3 t4=temp.count(4) t4 temp.count(4) temp.count temp count 4 if max(t1,t2,t3,t4)==2:
  print("YES")
else:
  print("NO") max(t1,t2,t3,t4)==2 max(t1,t2,t3,t4) max t1 t2 t3 t4 2 print("YES") print "YES" print("NO") print "NO" t3=temp.count(3) temp.count(3) t3 b2=map(int,input().split()) map(int,input().split()) b2 b3=map(int,input().split()) map(int,input().split()) b3 temp=[a1,a2,a3,b1,b2,b3] [a1,a2,a3,b1,b2,b3] temp t2=temp.count(2) temp.count(2) t2 a2,b2=map(int,input().split()) map(int,input().split()) a2 t4=temp.count(4) temp.count(4) t4 b1=map(int,input().split()) map(int,input().split()) b1 a1,b1=map(int,input().split()) map(int,input().split()) a1 a3,b3=map(int,input().split()) map(int,input().split()) a3 t1=temp.count(1) temp.count(1) t1
a1,b1=map(int,input().split())
a2,b2=map(int,input().split())
a3,b3=map(int,input().split())
temp=[a1,a2,a3,b1,b2,b3]
t1=temp.count(1)
t2=temp.count(2)
t3=temp.count(3)
t4=temp.count(4)
if max(t1,t2,t3,t4)==2:
  print("YES")
else:
  print("NO")