N = int(input())
map_a = map(int, input().split())
list_a = list(map_a)

d = [0]*7
tourist = 0

for i in range(N):
  if(1<= list_a[i]< 400):
    d[0]+= 1
  elif(400<= list_a[i]< 800):
    d[1]+= 1
  elif(800<= list_a[i]< 1200):
    d[2]+= 1
  elif(1200<= list_a[i]< 1600):
    d[3]+= 1
  elif(1600<= list_a[i]< 2000):
    d[4]+= 1
  elif(2000<= list_a[i]< 2400):
    d[5]+= 1
  elif(2400<= list_a[i]< 2800):
    d[6]+= 1
  else:
    tourist+= 1
    
color = 7- d.count(0)
min_color = max(color, tourist)
max_color = min(color+ tourist, 7)

print(min_color, max_color)