N = int(input())
a = map(int, input().split())

def color(r):
    if 1 <= r <= 399:
        return 'hai'
    elif r <= 799:
        return 'cha'
    elif r <= 1199:
        return 'midori'
    elif r <= 1599:
        return 'mizu'
    elif r <= 1999:
        return 'ao'
    elif r <= 2399:
        return 'ki'
    elif r <= 2799:
        return 'dai'
    elif r <= 3199:
        return 'aka'
    else:
        return 'all'

c = list(map(color, a))
cs = set(c)
cc = len(cs)
ac = c.count('all')
if ac == 0:
    print(cc, cc)
else:
    print(cc-1, min(cc+ac-1, 8))