N = int(input())
A = [int(i) for i in input().split()]

def CheckColor(a):
    global free_count
    if 1 <= a and a <= 399:
        return 'gray'
    elif 400 <= a and a <= 799:
        return 'blown'
    elif 800 <= a and a <= 1199:
        return 'green'
    elif 1200 <= a and a <= 1599:
        return 'water'
    elif 1600 <= a and a <= 1999:
        return 'blue'
    elif 2000 <= a and a <= 2399:
        return 'yellow'
    elif 2400 <= a and a <= 2799:
        return 'orange'
    elif 2800 <= a and a <= 3199:
        return 'red'
    else:
        free_count += 1
        return 'free'

def Max(L):
    global gree_count
    max_num = min_num + free_count
    if max_num > 8:
        return 8        
    else:
        return max_num

def Min(L):
    global min_num
    if 'free' in ans_set:
        min_num = len(L) - 1
    else:
        min_num = len(L)
    return min_num


ans_list = []
count = 0
min_num = 0
free_count = 0

for a in A:
    ans_list.append(CheckColor(a))

ans_set = set(ans_list)

print(Min(ans_set), Max(ans_set))