using static System.Math;
using static System.Console;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AtCoder
{
	class Program
	{
		static void Main(string[] args)
		{
			var n = int.Parse(ReadLine());
			var line = ReadLine().Split(' ').Select(value => int.Parse(value)).OrderBy(value => value).ToArray();
			var colors = new int[9];
			foreach(var point in line)
			{
				var i = point / 400;
				if(point >= 3200)
				{
					i = 8;
				}
				colors[i]++;
			}

			var count = 0;
			for(var i = 0; i < colors.Length; i++)
			{
				if(i != colors.Length - 1)
				{
					count += colors[i] > 0 ? 1 : 0;
				}
				else
				{
					Write($"{count} ");
					WriteLine(count + colors[i]);
				}
			}
		}
	}
}
