n = int(input())
a = [int(n) for n in input().split()] 

rate = {}

def color_check(n):
    if 1 <= n <= 399:
        return 'gray'
    elif 400 <= n <= 799:
        return 'brown'
    elif 800 <= n <= 1199:
        return 'green'
    elif 1200 <= n <= 1599:
        return 'lightblue'
    elif 1600 <= n <= 1999:
        return 'blue'
    elif 2000 <= n <= 2399:
        return 'yellow'
    elif 2400 <= n <= 2799:
        return 'orange'
    elif 2800 <= n <= 3199:
        return 'red'
    elif 3200 <= n:
        return 'top'

for n in a:
    col = color_check(n)
    rate.setdefault(col, 0)
    rate[col] += 1

colors = len(rate)

if not 'top' in rate:
    maxl, minl = colors, colors
else:
    if (colors - 1) >= rate['top']:
        maxl = (colors - 1) + rate['top']
        minl = (colors - 1)
    else:
        maxl = (colors - 1) + rate['top']
        minl = (colors - 1) + (rate['top'] - (colors - 1))

print(minl, maxl)