grey,brown,green,water,blue,yellow,orange,red,free_color = 0,0,0,0,0,0,0,0,0

num = list(map(int, input().split())) #cityの数、roadの数の配列
arr = list(map(int, input().split())) #i_1 i_2を取得し、iに値を入れる

for rate in arr:
    if grey==0 and 0 < rate < 400:
        grey = 1
    elif brown==0 and 400 <= rate < 800:
        brown = 1
    elif green==0 and 800 <= rate < 1200:
        green = 1
    elif water==0 and 1200 <= rate < 1600:
        water = 1
    elif blue==0 and 1600 <= rate < 2000:
        blue = 1
    elif yellow==0 and 2000 <= rate < 2400:
        yellow = 1
    elif orange==0 and 2400 <= rate < 2800:
        orange = 1
    elif red==0 and 2800 <= rate < 3200:
        red = 1
    elif 3200 <= rate:
        free_color = free_color+1

min_kind = grey+green+water+blue+yellow+orange+red
max_kind = min_kind + free_color
if min_kind==0:
    min_kind=1
    max_kind = free_color
print(str(min_kind) + ' ' + str(max_kind))
