n = int(input())
a = list(map(int, input().split()))
hai, tya midori = 0, 0, 0
mmiz, ao, ki = 0, 0, 0
yanagi, aka, got = 0, 0, 0

for i in a:
  if i<=399:
    hai = 1
  elif i<=799:
    tya = 1
  elif i<=1199:
    midori = 1
  elif i <= 1599:
    miz = 1
  elif i <= 1999:
    ao = 1
  elif i <= 2399:
      ki = 1
  elif i <= 2799:
      yanagi = 1
  elif i <= 3199:
      aka = 1
  elif i <= 4800:
    got += 1
minn = sum(hai+tya+midori+miz+ao+ki+yanagi+aka)
if minn + got >= 8:
  maxx = 8
else:
  maxx = minn+got
print(minn, maxx)