# C - Colorful Leaderboard

N = int(input())
a = list(map(int, input().split()))

n_gray_to_red = len(set([x//400 for x in a if x < 3200]))
n_3200_and_above = len([x for x in a if x >= 3200])

print(n_gray_to_red + max(0, n_3200_and_above - n_gray_to_red), min(8, n_gray_to_red + n_3200_and_above))