# ABC064 C - Colorful Leaderboard
N = map(int,input().split())
A = list(map(int,input().split()))

C = set()
Tourist = 0

for a in A:
    if 1<=a<=399:
        C.add('Glay')
    elif 400<=a<=799:
        C.add('Brown')
    elif 800<=a<=1199:
        C.add('Green')
    elif 1200<=a<=1599:
        C.add('Water')
    elif 1600<=a<=1999:
        C.add('Blue')
    elif 2000<=a<=2399:
        C.add('Yellow')
    elif 2400<=a<=2799:
        C.add('Orange')
    elif 2800<=a<=3199:
        C.add('Red')
    elif 3200<=a:
        C.add('Tourist')
        Tourist += 1

min = len(C) - (1 if Tourist >= 1 else 0)
max = len(C) + (Tourist -1 if Tourist >= 1 else 0)

if Tourist == N:
    min = 1

print(min,max)
