import numpy as np
n=int(input())
a=list(map(int,input().split()))
a=np.array(a)
a=a//400
a1=[i for i in a if i<8]
a2=[i for i in a if i>=8]
k=len(set(a1))
if k+len(a2)>8:m=8
else:m=k+len(a2)
if len(set(a1))!=0:s=len(set(a1))
else:s=1
print(s,m)