N = int(input())
A = [int(s) for s in input().split()]

def main():
    b = 400
    limit = 8
    rates = list(map(lambda n: min(limit, n // b), A))
    min_count = 0
    for i in range(limit):
        min_count += 1 if rates.count(i) else 0
    print(min_count, min_count + rates.count(limit))

if __name__ == '__main__':
    main()