# -*- coding: utf-8 -*-
"""
Created on Thu May 14 13:29:53 2020

@author: shinba
"""

n = int(input())

B = ["gray","brown","green","w","blue","y","o","r","f"]
data = {}

for b in B:
    data[b] = 0

for i in map(int,input().split()):
    if 1 <= i < 400:
        data["gray"] += 1
    elif 400 <= i < 800:
        data["brown"] += 1
    elif 800 <= i < 1200:
        data["green"] += 1
    elif 1200 <= i < 1600:
        data["w"] += 1
    elif 1600 <= i < 2000:
        data["blue"] += 1
    elif 2000 <= i < 2400:
        data["y"] += 1
    elif 2400 <= i < 2800:
        data["o"] += 1
    elif 2800 <= i < 3200:
        data["r"] += 1
    else:
        data["f"] += 1

f = data["f"]
data["f"] = 0
ans = 0
for i in data.values():
    if i != 0:
        ans += 1

if ans == 0:
    print(1,min(9,f))
else:
    print(ans,min(9,ans+f))