Program matches2; var a,b,c,d,e,r,j,k,m,n,o,p,z:real; f:text; begin assign(f,'matches.in'); reset(f); readln(f,a,b,c,d,e,r,j,k,m,n,o,p); close(f); z:=0; if not((a=b)and(b=c)and(c=d)and(a=d)) then z:=1; if not((e=r)and(r=j)and(j=k)and(e=k)) then z:=1; if not((m=n)and(n=o)and(o=p)and(p=m)) then z:=1; assign(f,'matcher.out'); rewrite(f); if z=0 then write(f,Yes) else write(f,No) close(f); end.