import sys
readline = sys.stdin.readline

def main():
    N = int(readline())
    A = list(map(int, readline().rstrip().split()))
    cnt = {k: 0 for k in ['gray', 'brown', 'green', 'light_blue', 'blue', 'yellow', 'orange', 'red', 'free']}
    for a in A:
        if a < 400:
            cnt['gray'] += 1
        elif a < 800:
            cnt['brown'] += 1
        elif a < 1200:
            cnt['green'] += 1
        elif a < 1600:
            cnt['light_blue'] += 1
        elif a < 2000:
            cnt['blue'] += 1
        elif a < 2400:
            cnt['yellow'] += 1
        elif a < 2800:
            cnt['orange'] += 1
        elif a < 3200:
            cnt['gray'] += 1
        else:
            cnt['free'] += 1

    mi = 0
    for k, v in zip(cnt.keys(), cnt.values()):
        if k == 'free':
            continue
        if v:
            mi += 1
    ma = mi + cnt['free']
    print(max(1, mi), ma)    


if __name__ == '__main__':
    main()