N = int(input())
a = list(map(int, input().split()))
color = [0, 0, 0, 0, 0, 0, 0, 0, 0]

a.sort()

for i in range(N):
  if 1 <= a[i] and a[i] < 400:
    color[0] = 1
    
  if 400 <= a[i] and a[i] < 800:
    color[1] = 1
    
  if 800 <= a[i] and a[i] < 1200:
    color[2] = 1
    
  if 1200 <= a[i] and a[i] < 1599:
    color[3] = 1
    
  if 1600 <= a[i] and a[i] < 1999:
    color[4] = 1
    
  if 2000 <= a[i] and a[i] < 2400:
    color[5] = 1
    
  if 2400 <= a[i] and a[i] < 2800:
    color[6] = 1
   
  if 2800 <= a[i] and a[i] < 3200:
    color[7] = 1 
  
  if 3200 <= a[i]:
    color[8] += 1 
  
print(str(max(color[8], sum(color) - color[8])) + ' ' +str(min(8, sum(color))))  