from collections import defaultdict

'''
def color(x):
    if x<400:
        return 'gray'
    elif x<800:
        return 'brown'
    elif x<1200:
        return 'green'
    elif x<1600:
        return 'light blue'
    elif x<2000:
        return 'blue'
    elif x<2400:
        return 'yellow'
    elif x<2800:
        return 'orange'
    elif x<3200:
        return 'red'
    else:
        return 'any'
'''

N=int(input())
a=list(map(int,input().split()))
dd=defaultdict(int)
for ai in a:
    dd[ai//400]+=1
d=dict(dd)

if 8 not in dd:
    mi=ma=len(dd)
else:
    mi=len(dd)-1
    ma=min(mi+dd[8],8)

print(mi,ma)