N = int(input())
a = [int(x) for x in input().split()]

color_dict = [0 for x in range(9)] # d[8]

for c in a :
    if c in range(1, 400) : color_dict[0] = 1
    elif c in range(400, 800) : color_dict[1] = 1
    elif c in range(800, 1200) : color_dict[2] = 1
    elif c in range(1200, 1600) : color_dict[3] = 1
    elif c in range(1600, 2000) : color_dict[4] = 1
    elif c in range(2000, 2400) : color_dict[5] = 1
    elif c in range(2400, 2800) : color_dict[6] = 1
    elif c in range(2800, 3200) : color_dict[7] = 1
    elif c >= 3200 : color_dict[8] += 1
        
tot = sum(color_dict)
rainbow = color_dict[8]

if tot >= rainbow :
    print(tot - rainbow, tot)
elif tot < rainbow :
    print(rainbow, tot + rainbow)