local read = setmetatable({}, {__index = function(t, k) local a = {} for i=1,#k do table.insert(a, '*'..string.sub(k, i, i)) end local r = io.read local u = table.unpack or unpack return function() return r(u(a)) end end})
read.N = function(N) local t={} for i=1,N do t[i]=read.n() end return t end
local str2tbl = function(s) local t={} local u=string.sub for i=1,#s do t[i] = u(s, i, i) end return t end
string.split = function(s) local t={} for w in string.gmatch(s, "[^%s]+") do table.insert(t, w) end return (table.unpack or unpack)(t) end
--
local N = read.n()
local A = read.N(N)
local function a(x)
    return x < 400 and 1
           or x < 800 and 2
           or x < 1200 and 3
           or x < 1600 and 4
           or x < 2000 and 5
           or x < 2400 and 6
           or x < 2800 and 7
end
local lt3200 = {}
local ge3200 = 0
for i=1,N do
    if A[i] < 3200 then
        lt3200[a(A[i])] = true
    else
        ge3200 = ge3200 + 1
    end
end

local count = 0
for _ in pairs(lt3200) do
    count = count + 1
end
local min = count
if min == 0 and ge3200 > 0 then
    min = 1
end
local max = count + ge3200
print(min .. " " .. max)