N = int(input())
a = list(map(int,input().split()))

free = 0

for i in range(N):
    rate = a[i] // 100
    if 1 <= rate <= 3:
        a[i] = "red"
    elif 4 <= rate <= 7:
        a[i] = "brown"
    elif 8 <= rate <= 11:
        a[i] = "green"
    elif 12 <= rate <= 15:
        a[i] = "cyan"
    elif 16 <= rate <= 19:
        a[i] = "blue"
    elif 20 <= rate <= 23:
        a[i] = "yellow"
    elif 24 <= rate <= 27:
        a[i] = "orange"
    elif 28 <= rate <= 31:
        a[i] = "red"
    else:
        a[i] = "free"

min_samples = len(set(a))
if "red" in a:
    min_samples -= 1

print(min_samples,min_samples + a.count("free"))
