def main():
    _ = int(input())
    a = [int(s) for s in input().split()]
    print(*solve(a))

def solve(a):
    s = set()
    t = 0
    f = 0

    for x in a:
        y = x // 400
        if x >= 3200:
            t += 1
            f = 1
        else:
            s.add(y)
    
    mi = max(len(s), f)
    ma = min(len(s) + t, 8)
    return mi, ma

main()
