def main():
    n = int(input())
    a = list(map(int,input().split()))
    ary = [0] * 8
    tmp = 0
    for i, aa in enumerate(a):
        if 0 < aa <= 399 and ary[0] == 0:
            ary[0] = 1
        elif 399 < aa <= 799 and ary[1] == 0:
            ary[1] = 1
        elif 799 < aa <= 1199 and ary[2] == 0:
            ary[2] = 1
        elif 1199 < aa <= 1599 and ary[3] == 0:
            ary[3] = 1
        elif 1599 < aa <= 1999 and ary[4] == 0:
            ary[4] = 1
        elif 1999 < aa <= 2399 and ary[5] == 0:
            ary[5] = 1
        elif 2399 < aa <= 2799 and ary[6] == 0:
            ary[6] = 1
        elif 2799 < aa <= 3199 and ary[7] == 0:
            ary[7] = 1
        elif 3199 < aa:
            tmp += 1
            # print(a[i])
    print(sum(ary), sum(ary) + tmp)

if __name__ =='__main__':
    main()
