program analysis;
{
	This program determines the average temperature of all the
	temperature stations in GYA.txt for each year in a range of years.
	It prints the year, the number of stations available, and the
	average temperature to the console for each year.
}
var
	data:text;
	station:string[12];
	year,y,count:integer;
	temperature,sum:real;
	
begin
	for year:=1800 to 2010 do begin
		write(year:1,' ');
		sum:=0;
		count:=0;
		reset(data,'GYA.txt');
		while not eof(data) do begin
			readln(data,station,y,temperature);
			if y=year then begin
				sum:=sum+temperature;
				inc(count);
			end;
		end;
		writeln(count:1,' ',sum/count:7:2);
		close(data);
	end;
end.