import numpy as np
N = int(input())
a = [int(_) for _ in input().split()]
a = np.array(a)
a = np.sort(a)
min = 0
max = 0
m = 0
for i in range(N):
    if m==0 and a[i]<400:
        min+=1
        break
    if m<400 and 400<=a[i]<800:
        min+=1
    if m<800 and 800<=a[i]<1200:
        min+=1
    if m<1200 and 1200<=a[i]<1600:
        min+=1
    if m<1600 and 1600<=a[i]<2000:
        min+=1
    if m<2000 and 2000<=a[i]<2400:
        min+=1
    if m<2400 and 2400<=a[i]<2800:
        min+=1
    if m<2800 and 2800<=a[i]<3200:
        min+=1
    m = a[i]

if len(np.where(a>=3200)[0])==0:
    max = min
else:
    max = min + len(np.where(a>=3200)[0])
    if max>8:
        max = 8
print (min, max)