parseInt(x) = parse(Int, x)

function main()
	n = readline() |> parseInt
	a = map(parseInt, split(readline()))
	rate = zeros(Int, 8)
	other = 0
	for i in 1:n
		if 1 <= a[i] <= 399
			rate[1] = 1
		elseif 400 <= a[i] <= 799
			rate[2] = 1
		elseif 800 <= a[i] <= 1199
			rate[3] = 1
		elseif 1200 <= a[i] <= 1599
			rate[4] = 1
		elseif 1600 <= a[i] <= 1999
			rate[5] = 1
		elseif 2000 <= a[i] <= 2399
			rate[6] = 1
		elseif 2400 <= a[i] <= 2799
			rate[7] = 1
		elseif 2800 <= a[i] <= 3199
			rate[8] = 1
		else
			other += 1
		end
	end
	print(sum(rate), " ", sum(rate)+other)
end

main()