N = int( input() )
As = [ map( int, input().split() ) ]

rate = []
anycol = 0
for i in A : 
  if i >= 3200 : 
    anycol += 1 
  else : 
     rate.append( i // 400 )

count = let( set(rate) )

print( max(count, 1), min(count+anycol, 8) )