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

colors=[]
niji=[]
for i in a:
    if 1<=i<=399:
        colors.append('灰')
    elif 400<=i<=799:
        colors.append('茶')
    elif 800<=i<=1199:
        colors.append('緑')
    elif 1200<=i<=1599:
        colors.append('水')
    elif 1600<=i<=1999:
        colors.append('青')
    elif 2000<=i<=2399:
        colors.append('黄')
    elif 2400<=i<=2799:
        colors.append('橙')
    elif 2800<=i<=3199:
        colors.append('赤')
    elif 3200<=i:
        niji.append('虹')

colors_count =len(set(colors))

if 0<= colors_count+len(niji)<=8:
    print(max(colors_count,1),colors_count+len(niji))
else:
    print(max(colors_count,1), 8)