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

if __name__ == "__main__":
    main()