#!/usr/bin/env python3

N = int(input())

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

gray = []
brown = []
green = []
sky = []
blue = []
yellow = []
orange = []
red = []
other = []

for i in range(len(a)):
    if 1 <= a[i] <= 399:
        gray.append(a[i])
    elif 400 <= a[i] <= 799:
        brown.append(a[i])
    elif 800 <= a[i] <= 1199:
        green.append(a[i])
    elif 1200 <= a[i] <= 1599:
        sky.append(a[i])
    elif 1600 <= a[i] <= 1999:
        blue.append(a[i])
    elif 2000 <= a[i] <= 2399:
        yellow.append(a[i])
    elif 2400 <= a[i] <= 2799:
        orange.append(a[i])
    elif 2800 <= a[i] <= 3199:
        red.append(a[i])
    elif 3200 <= a[i]:
        other.append(a[i])
    else:
        pass

num_gray = 0
num_brown = 0
num_green = 0
num_sky = 0
num_blue = 0
num_yellow = 0
num_orange = 0
num_red = 0
num_other_min = 0
num_other_max = 0
num_min = 0
num_max = 0

if len(brown) > 0:
    num_brown += 1
if len(green) > 0:
    num_green += 1
if len(sky) > 0:
    num_sky += 1
if len(blue) > 0:
    num_blue += 1
if len(yellow) > 0:
    num_yellow += 1
if len(orange) > 0:
    num_orange += 1
if len(red) > 0:
    num_red += 1
if len(other) > 0:
    num_other_min += 1
    num_other_max = len(other)

num_min = num_gray + num_brown + num_green + num_sky + num_blue + num_yellow \
          + num_orange + num_red + num_other_min

num_max = num_gray + num_brown + num_green + num_sky + num_blue + num_yellow \
          + num_orange + num_red + num_other_max

print(num_min, num_max)