from heapq import heappush, heappop
from itertools import permutations, accumulate, combinations
from math import pi, ceil, floor
import numpy as np
from collections import defaultdict, deque, Counter
from operator import itemgetter
from bisect import bisect_left, bisect_right, insort_left, insort_right
import sys
input = sys.stdin.readline
# sys.setrecursionlimit(10 ** 6)
# MOD = 10 ** 9 + 7
INF = float("inf")


def main():
    n = int(input())
    A = list(map(int, input().split()))
    color = [0] * 8
    god = 0
    for i in A:
        if i < 400:
            color['gray'] = 1
        elif i < 800:
            color['brown'] = 1
        elif i < 1200:
            color['green'] = 1
        elif i < 1600:
            color['light_blue'] = 1
        elif i < 2000:
            color['blue'] = 1
        elif i < 2400:
            color['yellow'] = 1
        elif i < 2800:
            color['orange'] = 1
        elif i < 3200:
            color['red'] = 1
        else:
            god += 1
    # print(color)
    print(len(color), len(color) + god)


if __name__ == '__main__':
    main()
