
def main():
    input()
    rate = [399, 799, 1199, 1599, 1999, 2399, 2799, 3199, 4800]
    t = list(map(int, input().split()))
    ret = {399: 0, 799: 0, 1199: 0, 1599: 0, 1999: 0, 2399: 0, 2799: 0, 3199: 0, 4800: 0}
    for v in t:
        for r in rate:
            if v <= r:
                ret[r] += 1
                break
    count = 0
    for k in ret:
        if ret[k] >= 1 and k != 4800:
            count += 1
    print(count, count + ret[4800])
    # print(ret)



if __name__ == '__main__':
    main()
