using System;
using System.Collections.Generic;

namespace ABC064_C_Colorful_Leaderboard
{
	internal class Program
	{
		public static void Main(string[] args)
		{
			int n = int.Parse(Console.ReadLine());
			string[] input = Console.ReadLine().Split(' ');
			List<int> aList = new List<int>(n);
			for(int i = 0; i < n; i++)
				aList.Add(int.Parse(input[i]));
			
			int maxColorCount = 0;
			int minColorCount = 0;
			int overRedCount = 0;
			bool gray, brown, green, lightBlue, blue, yellow, orange, red, overRed;
			gray = brown = green = lightBlue = blue = yellow = orange = red = overRed = false;

			for (int i = 0; i < n; i++)
			{
				if (aList[i] <= 399) gray = true;
				else if (aList[i] >= 400 && aList[i] <= 799) brown = true;
				else if (aList[i] >= 800 && aList[i] <= 1199) green = true;
				else if (aList[i] >= 1200 && aList[i] <= 1599) lightBlue = true;
				else if (aList[i] >= 1600 && aList[i] <= 1999) blue = true;
				else if (aList[i] >= 2000 && aList[i] <= 2399) yellow = true;
				else if (aList[i] >= 2400 && aList[i] <= 2799) orange = true;
				else if (aList[i] >= 2800 && aList[i] <= 3199) red = true;
				else
				{
					overRed = true;
					overRedCount++;
				}
			}

			if (gray)
			{
				maxColorCount++;
				minColorCount++;
			}
			if (brown)
			{
				maxColorCount++;
				minColorCount++;
			}
			if (green)
			{
				maxColorCount++;
				minColorCount++;
			}
			if (lightBlue)
			{
				maxColorCount++;
				minColorCount++;
			}
			if (blue)
			{
				maxColorCount++;
				minColorCount++;
			}
			if (yellow)
			{
				maxColorCount++;
				minColorCount++;
			}
			if (orange)
			{
				maxColorCount++;
				minColorCount++;
			}
			if (red)
			{
				maxColorCount++;
				minColorCount++;
			}
			
			if (overRed)
			{
				if (maxColorCount + overRedCount >= 7) maxColorCount = 7;
				else maxColorCount += overRedCount;
				
				//3200以上のみしか居ない場合でも、1色はないといけない
				if (minColorCount == 0) minColorCount++;
			}
			
			Console.WriteLine(minColorCount + " " + maxColorCount);
		}
	}
}