import sys
from collections import defaultdict
readline = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 8)
INF = float('inf')
MOD = 10 ** 9 + 7

def main():
    N = int(readline())
    A = list(map(int, readline().split()))
    d = defaultdict(int)
    free = 0
    for i in range(N):
        if 1<=A[i]<400:
            d['gray'] += 1
        elif 400<=A[i]<800:
            d['brown'] += 1
        elif 800<=A[i]<1200:
            d['green'] += 1
        elif 1200<=A[i]<1600:
            d['light_blue'] += 1
        elif 1600<=A[i]<2000:
            d['blue'] += 1
        elif 2000<=A[i]<2400:
            d['yellow'] += 1
        elif 2400<=A[i]<2800:
            d['orange'] += 1
        elif 2800<=A[i] < 3200:
            d['red'] += 1
        else:
            free += 1
    ans_min = max(len(d.keys()), 1)
    ans_max = min(8, len(d.keys())+free)
    print(ans_min, ans_max)


if __name__ == '__main__':
    main()