N = int(input())
A = list(map(int, input().split()))

rates = set()
NUM_RATES = 8
cnt = 0
for a in A:
    if (a < 400):
        rates.add(0)
    elif (400 <= a and a < 800):
        rates.add(1)
    elif (800 <= a and a < 1200):
        rates.add(2)
    elif (1200 <= a and a < 1600):
        rates.add(3)
    elif (1600 <= a and a < 2000):
        rates.add(4)
    elif (2000 <= a and a < 2400):
        rates.add(5)
    elif (2400 <= a and a < 2800):
        rates.add(6)
    elif (2800 <= a and a < 3200):
        rates.add(7)
    else:
        cnt += 1

print(len(rates), min(NUM_RATES, len(rates) + cnt))
