def main():
    _ = int(input())
    A = list(map(int, input().split()))
    c = [False] * 7
    h = 0
    for a in A:
        if a >= 3200:
            h += 1
            continue
        i = 0
        s = 0
        while 7 > i:
            if s + 400 <= a < s + 800:
                c[i] = True
            i += 1
            s = i * 400
    print(c.count(True), c.count(True) + h)


main()
