from sys import stdin, stdout
def readLine_int_list():return list(map(int, stdin.readline().split()))


def main():
    n = input()
    a = readLine_int_list()

    l = []
    f = False

    for i in a:
        rank = i//400
        if rank == 8:
            f = True
        l.append(i//400)
    any_col = l.count(8)
    p = len(set(l))

    if f:
        print(p-1, p+any_col-1)
    else:
        print(p, p)
        
if __name__ == "__main__":
    main()

