n = int(input())
a = list(map(int, input().split()))
l = []
rate = ['gray', 'brown', 'green', 'water', 'blue', 'yellow', 'orange', 'red']
count = 0

for i in range(n):
    q, r = divmod(a[i], 400)
    if q >= 8:
        count += 1
    else: l.append(rate[q])

print(len(set(l)), len(set(l))+count)