N = int(input())
*A, = map(int, input().split())

color = []
over = 0
for rate in A:
    if rate >= 3200:
        over += 1
    else:
        num = int(rate / 400)
        color.append(num)

color = set(color)
mini = len(color)
maxi = min(8, mini + over)
print("{} {}".format(mini, maxi))