n, *a = map(int, open(0).read().split())

def get_color(rate):
    if 1<=rate<400:
        return 'gray'
    elif rate<800:
        return 'brown'
    elif rate<1200:
        return 'green'
    elif rate<1600:
        return 'rb'
    elif rate<2000:
        return 'blue'
    elif rate<2400:
        return 'yellow'
    elif rate<2800:
        return 'orange'
    elif rate<3200:
        return 'red'
    else:
        return 'free'

c = set()
free_cnt = 0
for i in range(n):
    if get_color(a[i]) == 'free':
        free_cnt += 1
    else:
        c.add(get_color(a[i]))

min_ans = max(len(c),1)
max_ans = min(len(c)+free_cnt, 8)

print(min_ans, max_ans)