# -*- coding: utf-8 -*-
"""
http://abc064.contest.atcoder.jp/tasks/abc064_c

"""
import sys
from sys import stdin
from collections import defaultdict
input = stdin.readline


def get_color(s):
    ans = 'any'
    if s < 400:
        ans = 'gray'
    elif s < 800:
        ans = 'brown'
    elif s < 1200:
        ans = 'green'
    elif s < 1600:
        ans = 'light blue'
    elif s < 2000:
        ans = 'blue'
    elif s < 2400:
        ans = 'yellow'
    elif s < 2800:
        ans = 'orange'
    elif s < 3200:
        ans = 'red'
    return ans


def main(args):
    N = int(input())
    scores = [int(x) for x in input().split()]

    colors = defaultdict(int)
    for s in scores:
        res = get_color(s)
        colors[res] += 1

    normal_color = 0
    for k, v in colors.items():
        if k != 'any':
            normal_color += 1
    any_color = colors['any']
    print(normal_color, normal_color + any_color)


if __name__ == '__main__':
    main(sys.argv[1:])