def color_judge(n):
    if 1<=n<=399:
        return 'gray'
    elif n<=799:
        return 'brown'
    elif n<=1199:
        return 'green'
    elif n<=1599:
        return 'light blue'
    elif n<=1999:
        return 'blue'
    elif n<=2399:
        return 'yellow'
    elif n<=2799:
        return 'orange'
    elif n<=3199:
        return 'red'
    else:
        return 'choice'

n = int(input())
a = list(map(int, input().split()))
dic = {}
for i in a:
    dic[color_judge(i)] = 1
choice = 0
if dic.get('choice'):
    choice = dic['choice']
print(max(0, len(dic)-choice), min(8, len(dic)+choice))