program count (input, output);

const
   WEEKS = 13;

var
   ID : integer;
   oldID : integer;
   newID : integer;
   freq : integer;
   freqavg : real;
   amt : real;
   tot : real;
   amtavg : real;
   filename : text;

begin

   oldID := -1;
   reset(filename, 'give');
   while not eof (filename) do
      begin
	 readln (filename, ID, amt);
	 if (ID = oldID) then
	    begin
	       freq := freq + 1;
	       tot := tot + amt;
	    end {if}
	 else
	    begin
	       freqavg := freq / WEEKS;
	       amtavg := tot / WEEKS;
	       if oldID > 0 then
		  begin
     writeln(newID:5,':', freq:5,':', freqavg:5:2,':', tot:9:2,':', amtavg:9:2);
		  end;
	       freq := 1;
	       tot := amt;
	       oldID := ID;
	       newID := newID + 1;
	    end; {else-if}
      end; {while}
      
end. {program count}
