program Project2; {$APPTYPE CONSOLE} type tpoint= record c: array[1..13] of longint; end; tmass= array [1..101] of tpoint; var n,i,j: integer; a: tmass; function perevir(a:tmass; k:integer): boolean; var p: boolean; i,j,l: integer; begin l:=0; p:= false; for i:=1 to 11 do for j:=i+1 to 12 do if a[k].c[i] = a[k].c[j] then inc(l); if l=18 then p:= true; perevir:=p; end; begin { TODO -oUser -cConsole Main : Insert code here } assign(input,'matches.in'); reset(input); assign(output,'matches.out'); rewrite(output); readln(n); for i:=1 to n do for j:=1 to 12 do read(a[i].c[j]); for i:=1 to n do begin perevir(a,i); if (perevir(a,i)) then writeln('yes') else writeln('no'); end; end.