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

# static colors [gray, brown, green, water, blue, yellow, orange, red, free]
color_list = [0] * 9


def check_color(a):
    if a <= 399:
        return 0
    elif (a >= 400) & (a <=799):
        return 1
    elif (a >= 800) & (a <=1199):
        return 2
    elif (a >= 1200) & (a <=1599):
        return 3
    elif (a >= 1600) & (a <=1999):
        return 4
    elif (a >= 2000) & (a <=2399):
        return 5
    elif (a >= 2400) & (a <=2799):
        return 6
    elif (a >= 2800) & (a <=3199):
        return 7
    return 8

# input
N = int(input())
a_list = list(map(int, input().split()))

# do
ans = 0
for i in range(len(a_list)):
    n = check_color(a_list[i])
    if (color_list[n] == 0) & (n <= 7):
        ans += 1
    color_list[n] += 1

print(str(ans) + " " + str(ans + color_list[8]))
