#!/usr/bin/python
# -*- coding: utf-8 -*-
import sys
import math

N, = map(int, sys.stdin.readline().rstrip().split())
a_list = list(map(int, sys.stdin.readline().rstrip().split()))

def score_index(score):
    if score < 400:
        return 0
    if score < 800:
        return 1
    if score < 1200:
        return 2
    if score < 1600:
        return 3
    if score < 2000:
        return 4
    if score < 2400:
        return 5
    if score < 2800:
        return 6
    if score < 3200:
        return 7
    else:
        raise Exception()



superplayers = 0
counts = set()
for a in a_list:
    if a < 3200:
        counts.add(score_index(a))
    else:
        superplayers += 1

print("{} {}".format(
    len(counts),
    len(counts) + superplayers
))

exit(0)
