N = int(input())
a = list(map(int,input().split()))
H = 0
C = 0
M = 0
W = 0
B = 0
Y = 0
O = 0
R = 0

tuyo = 0

for i in range(N):
  if 0 < a[i] < 400 and H == 0:
    H += 1
  elif 399 < a[i] < 800 and C == 0:
    C += 1
  elif 799 < a[i] < 1200 and M == 0:
    M += 1
  elif 1199 < a[i] < 1600 and W == 0:
    W += 1
  elif 1599 < a[i] < 2000 and B == 0:
    B += 1
  elif 1999 < a[i] < 2400 and Y == 0:
    Y += 1
  elif 2399< a[i] < 2800 and O == 0:
    O += 1
  elif 2799 < a[i] < 3200 and R == 0:
    R += 1
  elif a[i] > 3199:
    tuyo += 1
min = H + C + M + W + B + Y + O + R 
if min == 0:
  min = 1
  tuyo -= 1
if min + tuyo < 8:
  max = min + tuyo
else:
  max = 8
print(min,max)