N = int(input())
S = list(map(int,input().split()))
count = 0
color = list()

for i in range(len(S)):
  if S[i] < 400:
    S[i] = "grey"
    
  elif S[i] < 800:
    S[i] = "blown"
    
  elif S[i] < 1200:
    S[i] = "green"
  
  elif S[i] < 1600:
    S[i] = "water"
    
  elif S[i] < 2000:
    S[i] = "blue"
  
  elif S[i] < 2400:
    S[i] = "yellow"
  
  elif S[i] < 2800:
    S[i] = "orange"
   
  elif S[i] < 3200:
    S[i] = "red"
    
  elif 3200 <= S[i]:
    S[i] = "wanwan"
    count += 1
  color.append(S[i])


color_set = set(color)
if count == 0:
  print(len(color_set),len(color_set))
else:
  print(len(color_set) -1,len(color_set) + count -1)
    
  
         