n=int(input())
a=list(map(int,input().split()))
color_val=0
bigList=[]
for i in range(1,400):
  if i in a:
    color_val+=1
    break
for s in range(400,800):
  if s in a:
    color_val+=1
    break
for t in range(800,1200):
  if t in a:
    color_val+=1
    break
for u in range(1200,1600):
  if u in a:
    color_val+=1
    break
for q in range(1600,2000):
  if q in a:
    color_val+=1
    break
for e in range(2000,2400):
  if e in a:
    color_val+=1
    break
for f in range(2400,2800):
  if f in a:
    color_val+=1
    break
for g in range(2800,3200):
  if g in a:
    color_val+=1
    break
for z in a:
  if z >=3200:
    bigList.append(z)
    
if color_val<8:
  color_val+=len(bigList)
  if color_val>8:
    print(color_val-len(bigList),8)
  else:
    print(color_val-len(bigList),color_val)
else:
  print(8,8)

    