# -*- coding: utf-8 -*-

import sys
import os

N = int(input())
A = list(map(int, input().split()))

B = [0] * 8
any_color = 0

for a in A:
    if a <= 399:
        B[0] += 1
    elif a <= 799:
        B[1] += 1
    elif a <= 1199:
        B[2] += 1
    elif a <= 1599:
        B[3] += 1
    elif a <= 1999:
        B[4] += 1
    elif a <= 2399:
        B[5] += 1
    elif a <= 2799:
        B[6] += 1
    elif a <= 3199:
        B[7] += 1
    else:
        any_color += 1

if any_color == 0:
    cnt = len([b for b in B if b > 0])
    print(cnt, cnt)
else:
    colored_num = len([b for b in B if b > 0])
    zero_num = len([b for b in B if b == 0])
    if zero_num <= any_color:
        max_num = 8
    else:
        max_num = colored_num + any_color
    print(colored_num, max_num)