n = int(input())
a = list(map(int, input().split()))
flag = [False for _ in range(8)]
flex = 0
for x in a:
    if x >= 3200:
        flex += 1
    else:
        flag[int(x/400)] = True
les = flag.count(True)
print(f"{les} {min([8,les+flex])}")