N=int(input())
a_n=[int(x) for x in input().split()]


r=[]
r.append([i for i in a_n if 1<=i<=399])
r.append([i for i in a_n if 400<=i<=799])
r.append([i for i in a_n if 800<=i<=1199])
r.append([i for i in a_n if 1200<=i<=1599])
r.append([i for i in a_n if 1600<=i<=1999])
r.append([i for i in a_n if 2000<=i<=2399])
r.append([i for i in a_n if 2400<=i<=2799])
r.append([i for i in a_n if 2800<=i<=3199])
R=[i for i in a_n if 3200<=i]

count=0
for i in range(len(r)):
    if r[i]:
        count+=1

print(str(count)+' '+str(count+len(R)))