    N = int(input())
    a = list(map(int, input().split()))
    gray = 0
    brown = 0
    green = 0
    sky = 0
    blue = 0
    yellow = 0
    orange = 0
    red = 0
    god = 0
    for i in range(N-1):
        if a[i] < 400:
            gray = True
        elif a[i] < 800:
            brown = True
        elif a[i] < 1200:
            green = True
        elif a[i] < 1600:
            sky = True
        elif a[i] < 2000:
            blue = True
        elif a[i] < 2400:
            yellow = True
        elif a[i] < 2800:
            orange = True
        elif a[i] < 3200:
            red = True
        else:
            god+=1
    if god > 0:
        color_max = int(gray) + int(brown) + int(green) + int(sky) + int(blue) + int(yellow) + int(orange) + int(red) + god
        color_min = int(gray) + int(brown) + int(green) + int(sky) + int(blue) + int(yellow) + int(orange) + int(red)
    else:
        color_max = int(gray) + int(brown) + int(green) + int(sky) + int(blue) + int(yellow) + int(orange) + int(red)
        color_min = color_max
    print(color_min, color_max)