import sys
input = sys.stdin.readline
import collections
N = int(input())
a = [int(x) for x in input().split()]
rate = [0] * 8
flag = 0
for i in a:
    if 1 <= i <= 399:
        rate[0] = 1
    elif 400 <= i <= 799:
        rate[1] = 1
    elif 800 <= i <= 1199:
        rate[2] = 1
    elif 1200 <= i <= 1599:
        rate[3] = 1
    elif 1600 <= i <= 1999:
        rate[4] = 1
    elif 2000 <= i <= 2399:
        rate[5] = 1
    elif 2400 <= i <= 2799:
        rate[6] = 1
    elif 2800 <= i <= 3199:
        rate[7] = 1
    elif 3200 <= i:
        flag += 1
color_count = rate.count(1)
if flag:
    ans = [max(1, color_count),min(color_count + flag, 8)]
    print(* ans)
else:
    ans = [color_count, color_count]
    print(* ans)