n = int(input())
a = list(map(int, input().split()))
x = 0
if len([i for i in a if i <= 799])>0:
  x = x + 1
if len([i for i in a if (800<=i)&(i<=1199)])>0:
  x = x + 1
if len([i for i in a if (1200<=i)&(i<=1599)])>0:
  x = x + 1
if len([i for i in a if (1600<=i)&(i<=1999)])>0:
  x = x + 1
if len([i for i in a if (2000<=i)&(i<=2399)])>0:
  x = x + 1
if len([i for i in a if (2400<=i)&(i<=2799)])>0:
  x = x + 1
if len([i for i in a if (2800<=i)&(i<=3199)])>0:
  x = x + 1
y = x #最大値はy
if len([i for i in a if 3200<=i])>0:
  if x == 0:
    x = x + 1
  else:
    y = y + len([i for i in a if 3200<=i])
if y > 8:
  y = 8
print(x, y)