def main():
    #from sys import stdin, setrecursionlimit
    #setrecursionlimit(10**9)
    #r = input()
    #n = int(input())
    #a, b = map(int, input().split())
    #s, y = input().split()
    #a = input().split()
    #a = [int(input()) for i in range(n)]
    #a = list(map(int, input().split()))
    #a = [list(map(int, input().split())) for i in range(n)]
    #a = [int(s) - 1 for s in input().split()]
    #l=[int(input()) for _ in range(int(input()))]
    #res = 0
    n = int(input())
    a = sorted(map(int, input().split()))

    import bisect
    rate = [1,400,800,1200,1600,2000,2400,2800,3200]
    idx = [0]*9
    cnt = [0]*9
    idx[0] = bisect.bisect_left(a,rate[0])
    for i in range(1,9):
        idx[i] = bisect.bisect_left(a,rate[i])
    for i in range(9):
        if i == 8:
            cnt[i] = len(a) - idx[i]
        else:
            cnt[i] = idx[i+1] - idx[i]
    mina = sum([1 for i in range(8) if cnt[i] > 0])
    maxa = mina + cnt[8]
    print(mina,maxa)
       
if __name__ == '__main__':
    main()

