import numpy as np
N=raw_input()
a=raw_input().split()


a=map(int,a)

th=np.arange(0,3600,400)

th=np.append(th,5000)

z=np.zeros(9)
for aa in a:
    for k in range(len(th)-1):
        if th[k] <= aa and aa < th[k+1]:
            z[k]+=1

a

mi=np.sum(z[:-1]>0)
mi

m=max(mi,1)
m

ma=mi+z[-1]
ma=int(min(ma,8))

ma
print('{} {}'.format(m,ma))