from statistics import median
#import collections
#aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]
from fractions import gcd
from itertools import combinations # (string,3) 3回
from collections import deque
from collections import defaultdict
import bisect
#
#    d = m - k[i] - k[j]
#    if kk[bisect.bisect_right(kk,d) - 1] == d:
#
#
#
# pythonで無理なときは、pypyでやると正解するかも！！
#
#

import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7

def readInts():
  return list(map(int,input().split()))
def main():
    n = int(input())
    A = readInts()
    dic = defaultdict(int)
    ok = 0
    for i in range(n):
        if 1 <= A[i] <= 399:
            dic['g'] = 1
        elif 400 <= A[i] <= 799:
            dic['b'] = 1
        elif 800 <= A[i] <= 1199:
            dic['gr'] = 1
        elif 1200 <= A[i] <= 1599:
            dic['w'] = 1
        elif 1600 <= A[i] <= 1999:
            dic['bl'] = 1
        elif 2000 <= A[i] <= 2399:
            dic['f'] = 1
        elif 2400 <= A[i] <= 2799:
            dic['bbb'] = 1
        elif 2800 <= A[i] <= 3199:
            dic['adava'] = 1
        else:
            ok += 1
    cnt = 0
    for k,v in dic.items():
        cnt += 1
    print(cnt,cnt+ok)
if __name__ == '__main__':
  main()
