#-*-coding:utf-8-*-

def main():
    n = int(input())
    a_list = list(map(int, input().split()))

    flag = [0 for i in range(8)]
    other_cnt = 0

    for i in a_list:
        if 1 <= i and i < 400:
            flag[0] = 1
        elif 400 <= i and i < 800:
            flag[1] = 1
        elif 800 <= i and i < 1200:
            flag[2] = 1
        elif 1200 <= i and i < 1600:
            flag[3] = 1
        elif 1600 <= i and i < 2000:
            flag[4] = 1
        elif 2000 <= i and i < 2400:
            flag[5] = 1
        elif 2400 <= i and i < 2800:
            flag[6] = 1
        elif 2800 <= i and i < 3200:
            flag[7] = 1
        elif i >= 3200:
            other_cnt += 1
        
    print(sum(flag), sum(flag) + other_cnt)
        

if __name__ == '__main__':
    main()