n = int(input())
a = list(map(int,input().split()))
rates = {}

def add_rates(i):
    if i not in rates:
        rates[i] = 1
    else:
        rates[i] += 1

for i in range(n):
    if a[i] < 400:
        add_rates(0)
    elif 400 <= a[i] < 800:
        add_rates(1)
    elif 800 <= a[i] < 1200:
        add_rates(2)
    elif 1200 <= a[i] < 1600:
        add_rates(3)
    elif 1600 <= a[i] < 2000:
        add_rates(4)
    elif 2000 <= a[i] < 2400:
        add_rates(5)
    elif 2400 <= a[i] < 2800:
        add_rates(6)
    elif 2800 <= a[i] < 3200:
        add_rates(7)
    elif 3200 <= a[i]:
        add_rates(8)

cnt = len(rates)
if 8 not in rates:
    print(cnt, cnt)
else:
    print(cnt-1, cnt-1+rates[8])