from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]
dy8, dx8 = [0, -1, 0, 1, 1, -1, -1, 1], [1, 0, -1, 0, 1, 1, -1, -1]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


def ceil(a, b):
    return (a + b - 1) // b


def main():
    N = int(input())
    A = list(map(int, input().split()))

    ans = [0] * 8
    ex = 0
    for a in A:
        if a <= 399:
            ans[0] += 1
        elif a <= 799:
            ans[1] += 1
        elif a <= 1199:
            ans[2] += 1
        elif a <= 1599:
            ans[3] += 1
        elif a <= 1999:
            ans[4] += 1
        elif a <= 2399:
            ans[5] += 1
        elif a <= 2799:
            ans[6] += 1
        elif a <= 3199:
            ans[7] += 1
        else:
            ex += 1

    n = 8 - ans.count(0)
    print(max(1, n), min(8, n + ex))


if __name__ == '__main__':
    main()
