N=int(input())
a=list(map(int,input().split()))
count=0
for i in range(0,2801,400):
  for j in range(N):
    if i<=a[j]<=399+i:
      count+=1
      break
c=0
for i in range(N):
  if 3200<=a[i]:
    c+=1

if count!=0:
  if c>=2:
    if count<7:
      print(count,count+2)
    else:
      print(count,8)
  elif c==1:
    if count<8:
      print(count,count+1)
    else:
      print(count,8)
  else:
    print(count,count)
else:
  if c<8:
    print(1,c)
  else:
    print(1,8)