N = int(input())
s = map(int,input().split())

ls2 = [i // 400 for i in list(s)]
ls3 = [ 8 if i >8 else i for i in ls2]
ls4 = [i for i in ls3 if i  != 8 ]
ls5 = [i for i in ls3 if i  == 8 ]

import collections
c3 = collections.Counter(ls3)
c4 = collections.Counter(ls4)
print(str(len(c4)) + " " + str(min(8,len(c4)+c3[8])))