N=int(input())
m=list(map(int,input().split()))
ans=0
rainbow=0
table=[0,0,0,0,0,0,0,0]
for i in m:
  if i>3199:
    rainbow+=1
  else:
    if table[i//400]==0:
      ans=ans+1
      table[i//400]=1
print(table)
print(max(1,sum(table)),sum(table)+rainbow)
