## input
N = int(input())
An_list = list( map(int, input().split()) )

## define
class ColorRank():
    def __init__(self, color, low, high):
        self.color = color
        self.low = low
        self.high = high
        self.cnt = 0

rate_list = [ ColorRank( "hai", 1, 399 )
             ,ColorRank( "cha", 400, 799 )
             ,ColorRank( "midori", 800, 1199 )
             ,ColorRank( "mizu", 1200, 1599 )
             ,ColorRank( "ao", 1600, 1999 )
             ,ColorRank( "ki", 2000, 2399 )
             ,ColorRank( "daidai", 2400, 2799 )
             ,ColorRank( "aka", 2800, 3199 )
             ,ColorRank( "top", 3200, 4800 )
             ]

## main
for an in An_list:
    for i,rate in enumerate( rate_list ):
        if rate.low <= an <= rate.high:
            rate_list[i].cnt += 1
            break

rateN = len([ color_rank for color_rank in rate_list if color_rank.cnt > 0 and color_rank.color != "top" ])
N_min = 1 if rate_list[8].cnt > 0 else 0
N_max = rate_list[8].cnt if rate_list[8].cnt > 0 else 0
rateN_min = rateN + N_min
rateN_max = rateN + N_max
print( ' '.join( [ str(rateN_min), str(rateN_max) ] ) )