# -*- coding: utf-8 -*-
import sys

N = input()
an = input()
lit = sorted(map(int, an.split()))
color = {}

for i in range(400, 3199, 399):
    color[i] = filter(lambda x: i-400 < x <i , lit)
color[3200] = filter(lambda x: x>=3200, lit)

c = len(color)
if color.has_key(3200):
    c -= - 1

if c >= 8:
    print('8 8')
else:
    rainbow = len(color[3200])
    mini = c
    c += rainbow
    maxi = 8 if c >= 8 else c
    print('{} {}'.format(mini, maxi))
