#!/usr/bin/env python3
 
N = int(input())
 
a = list(map(int, input().split()))
b = [0, 0, 0, 0, 0, 0, 0, 0, 0]
 
for i in range(len(a)):
    if 1 <= a[i] <= 399:
        b[0] = 1
    elif 400 <= a[i] <= 799:
        b[1] = 1
    elif 800 <= a[i] <= 1199:
        b[2] = 1
    elif 1200 <= a[i] <= 1599:
        b[3] = 1
    elif 1600 <= a[i] <= 1999:
        b[4] = 1
    elif 2000 <= a[i] <= 2399:
        b[5] = 1
    elif 2400 <= a[i] <= 2799:
        b[6] = 1
    elif 2800 <= a[i] <= 3199:
        b[7] = 1
    else:
        b[8] += 1

num_min = sum(b) - b[8]
 
num_max = sum(b)
 
print(num_min, num_max)