#C - Colorful Leaderboard 

N = int(eval(input()))

a = list(map(int,input().split()))



mini = 0

color_list = []

for i in a:

    if (i//400)<8 and ((i//400 in color_list) == False):

        mini += 1

        color_list.append(i//400)



maxi = mini

for j in a:

    if j >= 3200:

        maxi += 1

if mini == 0:#忘れてた

    mini = 1

print((mini,maxi))
#8 C - Colorful Leaderboard

N = int(eval(input()))

a = list(map(int,input().split()))



seen = [False]*8

cnt = 0

cnt_3200 = 0

for i in a:

    i = i//400

    if i >= 8:

        cnt_3200 += 1

    elif (seen[i] == False):

        cnt += 1

        seen[i] = True

    

if cnt == 0:

    print((1,cnt_3200))

else:

    print((cnt,cnt+cnt_3200))
# C - Colorful Leaderboard
N = int(eval(input()))
a = list(map(int, input().split()))
mini = 0
color_list = []
for i in a:
    if (i // 400) < 8 and ((i // 400 in color_list) == False):
        mini += 1
        color_list.append(i // 400)
maxi = mini
for j in a:
    if j >= 3200:
        maxi += 1
if mini == 0:  # 忘れてた
    mini = 1
print((mini, maxi))

# 8 C - Colorful Leaderboard
N = int(eval(input()))
a = list(map(int, input().split()))
seen = [False] * 8
cnt = 0
cnt_3200 = 0
for i in a:
    i = i // 400
    if i >= 8:
        cnt_3200 += 1
    elif seen[i] == False:
        cnt += 1
        seen[i] = True
if cnt == 0:
    print((1, cnt_3200))
else:
    print((cnt, cnt + cnt_3200))

-# C - Colorful Leaderboard +# 8 C - Colorful Leaderboard -mini = 0 -color_list = [] +seen = [False] * 8 +cnt = 0 +cnt_3200 = 0 -    if (i // 400) < 8 and ((i // 400 in color_list) == False): -        mini += 1 -        color_list.append(i // 400) -maxi = mini -for j in a: -    if j >= 3200: -        maxi += 1 -if mini == 0:  # 忘れてた -    mini = 1 -print((mini, maxi)) +    i = i // 400 +    if i >= 8: +        cnt_3200 += 1 +    elif seen[i] == False: +        cnt += 1 +        seen[i] = True +if cnt == 0: +    print((1, cnt_3200)) +else: +    print((cnt, cnt + cnt_3200))