def main():
    n = int(input())
    a = list(map(int, input().split()))

    color = [False] * 9
    cnt_anycolor = 0

    for i in a:
        if i <= 399:
            color[0] = True
        elif i <= 799:
            color[1] = True
        elif i <= 1199:
            color[2] = True
        elif i <= 1599:
            color[3] = True
        elif i <= 1999:
            color[4] = True
        elif i <= 2399:
            color[5] = True
        elif i <= 2799:
            color[6] = True
        elif i <= 3199:
            color[7] = True
        else:
            color[8] = True
            cnt_anycolor += 1

    min_color = 0
    max_color = 0

    for c in color:
        if c:
            min_color += 1
            max_color += 1

    if color[8]:
        if not(min_color == 0):
            min_color -= 1
        max_color += (cnt_anycolor - 1)

    print(min_color, max_color)


if __name__ == '__main__':
    main()

    