def main():
    N = int(input())
    a = [0] + [int(ele) for ele in input().split()]
    a.sort()
    ans_min = 0
    ans_min += 1 if len(list(filter(lambda x: 1 <= x <= 399, a ))) > 0 else 0
    ans_min += 1 if len(list(filter(lambda x: 400 <= x <= 799, a )))> 0 else 0
    ans_min += 1 if len(list(filter(lambda x: 800 <= x <= 1200, a )))> 0 else 0
    ans_min += 1 if len(list(filter(lambda x: 1200 <= x <= 1599, a )))> 0 else 0
    ans_min += 1 if len(list(filter(lambda x: 1600 <= x <= 1999, a )))> 0 else 0
    ans_min += 1 if len(list(filter(lambda x: 2000 <= x <= 2399, a )))> 0 else 0
    ans_min += 1 if len(list(filter(lambda x: 2400 <= x <= 2799, a )))> 0 else 0
    ans_min += 1 if len(list(filter(lambda x: 2800 <= x <= 3199, a )))> 0 else 0
    over = list(filter(lambda x: 3200 < x, a ))

    ans_max =  ans_min + len(over)
    ans_min += 1 if len(over)> 0 else 0
    print(ans_min, ans_max)

    
    

if __name__=="__main__":
    main()