n = int(input())
arr = list(map(int, input().split()))
mx = 0
mn = 0
d = {}
colors = ["gray", "brown", "green", "cyan", "blue", "yellow", "orange", "red"]
for i in colors:
  d[i] = 0
for i in arr:
  if i in range(1, 400):
    if d["gray"] == 0:
      mx += 1
      mn += 1
    d["gray"] = 1
  elif i in range(400, 800):
    if d["brown"] == 0:
      mx += 1
      mn += 1
    d["brown"] = 1
  elif i in range(800, 1200):
    if d["green"] == 0:
      mx += 1
      mn += 1
    d["green"] = 1
  elif i in range(1200, 1600):
    if d["cyan"] == 0:
      mx += 1
      mn += 1
    d["cyan"] = 1
  elif i in range(1600, 2000):
    if d["blue"] == 0:
      mx += 1
      mn += 1
    d["blue"] = 1
  elif i in range(2000, 2400):
    if d["yellow"] == 0:
      mx += 1
      mn += 1
    d["yellow"] = 1
  elif i in range(2400, 2800):
    if d["orange"] == 0:
      mx += 1
      mn += 1
    d["orange"] = 1
  elif i in range(2800, 3200):
    if d["red"] == 0:
      mx += 1
      mn += 1
    d["red"] = 1
  else:
    for k, v in d.items():
      if v == 0:
        mx += 1
        d[k] = 1
        break
print(mx, mn)
