# -*- coding: utf-8 -*-
import numpy as np

N = int(input())
a = list(map(int, input().split()))
r = np.array(a)//400
s = set(r)

if 8 in s and len(s)==1 :
    min = 1
    max = len(a)
elif 8 not in s:
    min = len(s)
    max = len(s)
else :
    min = len(s) - 1
    max = min + len(r[r==8])

print(min, max)