N = int(input())
A = list(map(int, input().split()))
m = {}
non_color = 0

for a in A:
    if a < 400:
        m[0] = 1
    elif 400 <= a and a < 800:
        m[1] = 1
    elif 800 <= a and a < 1200:
        m[2] = 1
    elif 1200 <= a and a < 1600:
        m[3] = 1
    elif 1600 <= a and a < 2000:
        m[4] = 1
    elif 2000 <= a and a < 2400:
        m[5] = 1
    elif 2400 <= a and a < 2800:
        m[6] = 1
    elif 2800 <= a and a < 3200:
        m[7] = 1
    elif 3200 <= a:
        non_color += 1

if non_color > 0:
    print(max(len(m), 1), min(8, len(m)+non_color))
else:
    print(len(m), len(m))
