#!/usr/bin/env python
#-*- coding: utf-8 -*-

from collections import defaultdict
from math import factorial as f
from fractions import gcd as g

N = int (raw_input ())
l = [int (i) for i in raw_input ().split ()]

d = defaultdict (int)
c = 0
for i in l:
    if i < 400: d ["gray"] += 1
    elif i < 1200: d ["brown"] += 1
    elif i < 1600: d ["green"] += 1
    elif i < 2000: d ["blue"] += 1
    elif i < 2400: d ["yellow"] += 1
    elif i < 2800: d ["orange"] += 1
    elif i < 3200: d ["red"] += 1
    else: c += 1

print max (1, len (d.keys ())), len (d.keys ()) + c
