def main():
    n=int(input())
    a=list(map(int,input().split(' ')))
    color = [0]*8
    ans_max = 0
    for i in a:
        if 1<= i <= 399:
            color[0] = 1
        elif i <= 799:
            color[1]=1
        elif i <= 1199:
            color[2] = 1
        elif i <= 1599:
            color[3] = 1
        elif i <= 1999:
            color[4] = 1
        elif i <= 2399:
            color[5] = 1
        elif i <= 2799:
            color[6] = 1
        elif i <= 3199:
            color[7] = 1
        else:
            ans_max += 1
    print(max(1,sum(color)),min(8,ans_max+sum(color)))
if __name__ == '__main__':
    main()