n = int(input())
a = list(map(int,input().split()))
l = []
rcoder = 0
for i in a:
  if i<400:
    l.append("gray")
  elif i>399 and i<800:
    l.append("brown")
  elif i>799 and i<1200:
    l.append("green")
  elif i>1199 and i<1600:
    l.append("light")
  elif i>1599 and i<2000:
    l.append("blue")
  elif i>1999 and i<2400:
    l.append("yellow")
  elif i>2399 and i<2800:
    l.append("orange")
  elif i>2799:
    l.append("red")
    if i>3199:
      rcoder+=1
print(len(set(l)),len(set(l))+rcoder)