import copy

n = int(eval(input()))

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



color = [0]*9

for i in range(n):

    rate = min(a[i]//400, 8)

    color[rate] += 1



ans_min = 0

color_min = copy.deepcopy(color)

for c in color_min[:-1]:

    if c > 0:

        ans_min += 1

ans_min = max(1, ans_min)



ans_max = 0

color_max = copy.deepcopy(color)

for c in color_max[:-1]:

    if c > 0:

        ans_max += 1

ans_max += color_max[-1]



print((ans_min, ans_max))
n = int(eval(input()))

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



rates = [0]*9

for i in range(n):

  r = min(a[i]//400, 8)

  rates[r] += 1



n_min, n_max = 0, 0

if max(rates[:-1]) > 0:

  for i in range(8):

    n_min += 1 if rates[i] > 0 else 0

  n_max = n_min+rates[-1]

else:

  n_min = 1

  n_max = rates[-1]



print((n_min, n_max))
import copy

n = int(eval(input()))
a = list(map(int, input().split()))
color = [0] * 9
for i in range(n):
    rate = min(a[i] // 400, 8)
    color[rate] += 1
ans_min = 0
color_min = copy.deepcopy(color)
for c in color_min[:-1]:
    if c > 0:
        ans_min += 1
ans_min = max(1, ans_min)
ans_max = 0
color_max = copy.deepcopy(color)
for c in color_max[:-1]:
    if c > 0:
        ans_max += 1
ans_max += color_max[-1]
print((ans_min, ans_max))

n = int(eval(input()))
a = list(map(int, input().split()))
rates = [0] * 9
for i in range(n):
    r = min(a[i] // 400, 8)
    rates[r] += 1
n_min, n_max = 0, 0
if max(rates[:-1]) > 0:
    for i in range(8):
        n_min += 1 if rates[i] > 0 else 0
    n_max = n_min + rates[-1]
else:
    n_min = 1
    n_max = rates[-1]
print((n_min, n_max))

-import copy - -color = [0] * 9 +rates = [0] * 9 -    rate = min(a[i] // 400, 8) -    color[rate] += 1 -ans_min = 0 -color_min = copy.deepcopy(color) -for c in color_min[:-1]: -    if c > 0: -        ans_min += 1 -ans_min = max(1, ans_min) -ans_max = 0 -color_max = copy.deepcopy(color) -for c in color_max[:-1]: -    if c > 0: -        ans_max += 1 -ans_max += color_max[-1] -print((ans_min, ans_max)) +    r = min(a[i] // 400, 8) +    rates[r] += 1 +n_min, n_max = 0, 0 +if max(rates[:-1]) > 0: +    for i in range(8): +        n_min += 1 if rates[i] > 0 else 0 +    n_max = n_min + rates[-1] +else: +    n_min = 1 +    n_max = rates[-1] +print((n_min, n_max))