n = int(input())
a = list(map(int,input().split()))
colorNum = [0] * 8
color = [399,799,1199,1599,1999,2399,2799,3199]
free, minNum, notUsedColor = 0,0,0
for i in range(n):
  for m in range(8):
    if color[m] >= a[i]:
      colorNum[m] += 1
      break
  if a[i] >= 3200:
    free += 1
for m in range(8):
  if colorNum[m] > 0:
    minNum += 1
  else:
    notUsedColor += 1
maxNum = 0
if notUsedColor - free >= 0:
  maxNum = free
else:
  maxNum = notUsedColor
print(minNum, minNum + maxNum)