N=int(input())
A = list(map(int, input().split()))
gray=any([1<=i<=399 for i in A])
brown=any([400<=i<=799 for i in A])
green=any([800<=i<=1199 for i in A])
sky=any([1200<=i<=1599 for i in A])
blue=any([1600<=i<=1999 for i in A])
yellow=any([2000<=i<=2399 for i in A])
orange=any([2400<=i<=2799 for i in A])
red=any([2800<=i<=3199 for i in A])
color_list=[gray,brown,green,sky,blue,yellow,orange,red]
count= color_list.count(True)
change=len([i for i in A if 3200<=i])
print(count,count+change)