N = int(input())
A = list( map(int,input().split()) )
flag = [0 for i in range(8)]
n = 0
c = 0
for a in A:
  if a // 400 >= 8:
    n += 1
  elif flag[a//400] == 0:
    flag[a//400] = 1
    c += 1

if c == 0:
  print( 1 , min( 8,c+n ) )
else:
  print( c , min( 8,c+n ) )