def main():
    N = int(input())
    A = [int(a) for a in input().split()]

    if all(a >=3200 for a in A):
        return 1, min(len(A), 8)

    cls = set()
    count = 0
    for a in A:
        isAbove = True
        for i in range(8):
            if 400*i <= a < 400*(i+1):
                cls.add(i)
                isAbove = False
                break
        if isAbove:
            count += 1
    return len(cls), min(len(cls)+count, 8)

if __name__ == '__main__':
    output = main()
    print(" ".join(map(str, output)))