import sys

N = int(sys.stdin.readline().rstrip())
A = map(int, sys.stdin.readline().rstrip().split())

colors = set()
free = 0
for a_i in A:
    color = a_i // 400
    if color >= 8:
        free += 1
    else:
        colors.add(color)

n = len(colors)
print(n, min(8, n + free))