Program Totalthd (input,output); (*Prg reads std nw outfile and sums hits*) var z,l,n,j,k,g,F :longint; x,y :char; ifil,ofil :text; namei,p,u :string; r,s,t :real; total3 :array[1..3328] of integer; Begin writeln('Enter the name of the input file'); readln(namei); assign(ifil,namei); reset(ifil); assign(ofil,'tot3'); rewrite(ofil); n:=0; k:=0; l:=1; for l:=1 to 3328 do total3[l]:=0; while not eof(ifil) and not eoln(ifil) do begin readln(ifil,z,r); total3[z]:=total3[z]+1; end; for l:=1 to 3328 do if total3[l]>=3 then begin n:=3*l; writeln(ofil,n,' ',total3[l]); end; close(ifil); close(ofil); end.