# -*- coding: utf-8 -*-

n = int(input())
A = list(map(int, input().split()))

B = {'a': 0, 'b': 0, 'c': 0, 'd': 0, 'e': 0, 'f': 0, 'g': 0, 'h': 0, 'z': 0}
for a in A:
    if 1 <= a <= 399:
        B['a'] += 1
    elif 400 <= a <= 799:
        B['b'] += 1
    elif 800 <= a <= 1199:
        B['c'] += 1
    elif 1200 <= a <= 1599:
        B['d'] += 1
    elif 1600 <= a <= 1999:
        B['e'] += 1
    elif 2000 <= a <= 2399:
        B['f'] += 1
    elif 2400 <= a <= 2799:
        B['g'] += 1
    elif 2800 <= a <= 3199:
        B['h'] += 1
    else:
        B['z'] += 1

ans = 0
for b in list(B.values())[:-1]:
    if b > 0:
        ans += 1
print(max(1, ans), ans + B['z'])
