n = int(input())
data = list(map(int,input().split()))

def mapColor(rate):
    if rate<=399:
        return 'grey'
    if rate<=799:
        return 'tea'
    if rate<=1199:
        return 'green'
    if rate<=1599:
        return 'water'
    if rate<=1999:
        return 'blue'
    if rate<=2399:
        return 'yellow'
    if rate<=2799:
        return 'orange'
    if rate<=3199:
        return 'red'
    return 'any'

s = set()

x = 0

for d in data:
    c = mapColor(d)
    if c=='any':
        x+=1
    else:
        s.add(c)

print(len(s),end=" ")
print(x+len(s))
