n = int(input())
a = list(map(int,input().split()))
colors = set()
kami = 0
for i in range(n):
    if 1 <= a[i] <= 399:
        colors.add('hai')
    elif 400 <= a[i] <= 799:
        colors.add('cha')
    elif 800 <= a[i] <= 1199:
        colors.add('midori')
    elif 1200 <= a[i] <= 1599:
        colors.add('mizu')
    elif 1600 <= a[i] <= 1999:
        colors.add('ao')
    elif 2000 <= a[i] <= 2399:
        colors.add('kiiro')
    elif 2400 <= a[i] <= 2799:
        colors.add('daidai')
    elif 2800 <= a[i] <= 3199:
        colors.add('aka')
    else:
        kami += 1
if kami == 0:
    print(len(colors),len(colors))
elif len(colors) >= kami:
    print(max(len(colors), 1), min(len(colors)+kami,8))
