def rate(n:int) ->str:
    if 1 <= n <= 399:
        return 'hai'
    elif n <= 799:
        return 'cha'
    elif n <= 1199:
        return 'mido'
    elif n <= 1599:
        return 'mizu'
    elif n <= 1999:
        return 'ao'
    elif n <= 2399:
        return 'ki'
    elif n <= 2799:
        return 'dai'
    elif n <= 3199:
        return 'aka'
    else:
        return 'neutral'

def main():
    n = int(input())
    a = [int(x) for x in input().split()]
    d = {}
    d_n = {}
    n_count = 0
    for aa in a:
        buf = rate(aa)
        if buf == 'neutral':
            n_count += 1
            continue
        if buf not in d:
            d[buf] = 0
        d[buf] += 1
    if n_count >= 1:
        print(len(d.values()),len(d.values()) + n_count)
    else:
        print(len(d.values()),len(d.values()))

if __name__ == '__main__':
    main()
