#!/usr/bin/env python3
import sys


def solve(N: int, a: "List[int]"):
    ans = [0] * 8
    a32 = 0
    for i in a:
        if(i >= 3200):
            a32 += 1
        else:
            if(i < 400):
                ans[0] = min(ans[0]+1, 1)
            elif(400 <= i < 800):
                ans[1] = min(ans[1]+1, 1)
            elif(800 <= i < 1200):
                ans[2] = min(ans[2]+1, 1)
            elif(1200 <= i < 1600):
                ans[3] = min(ans[3]+1, 1)
            elif(1600 <= i < 2000):
                ans[4] = min(ans[4]+1, 1)
            elif(2000 <= i < 2400):
                ans[5] = min(ans[5]+1, 1)
            elif(2400 <= i < 2800):
                ans[6] = min(ans[6]+1, 1)
            elif(2800 <= i < 3200):
                ans[7] = min(ans[7]+1, 1)     

    print(sum(ans), min(8,sum(ans)+a32))
    return


# Generated by 1.1.4 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    a = [ int(next(tokens)) for _ in range(N) ]  # type: "List[int]"
    solve(N, a)

if __name__ == '__main__':
    main()
