def main():
    import sys
    n = int(input())
    a = list(map(int, input().split()))
    color = [False] * 8
    sub_color = 0
    count = 0
    for score in a:
        if 1 <= score <= 399:
            color[0] = True
            continue
        for i in range(1,8):
            if i*400 <= score <= 399+(i*400):
                color[i] = True
        if score >= 3200:
            sub_color += 1
    for j in color:
        if j:
            count += 1
    if count == 0:
        print(1, sub_color, sep=" ")
    else:
        if count + sub_color >= 8:
            print(count, 8, sep=" ")
        else:
            print(count, count+sub_color, sep=" ")

if __name__ == "__main__":
    main()