N = input()
A = sorted([int(x) for x in input().split()])

#配列と範囲の条件をもとに、
#条件を満たすものの個数と、満たさないもののリストを返す。
def Count(A,max):
  if len(A)==0:
    A_next = A
    
  elif len(A)==1:
    if A<=max:
      A_next = []
    else:
      A_next = A
      
  else:
  	A_next = [y for y in A if not(y<=max)]
  
  num = 0
  if (len(A) -len(A_next))>0:
    num = 1
  return num, len(A_next)

max = 399
num_list = []
for max_add in range(8):
  max += (max_add)*400
  num, A= Count(A,max)
  num_list.append(num)
  
min_num = sum(num_list)
max_num = min(8, min_num+len(A))

print(min_num, max_num)