n = int(input())
arr = []
color = []
over = []
a = input().split()
for i in a:
    arr.append(int(i))
for j in range(n):
    if arr[j] >= 1 and arr[j] <= 399:
        color.append("glay")
    elif arr[j] >= 400 and arr[j] <= 799:
        color.append("brown")
    elif arr[j] >= 800 and arr[j] <= 1599:
        color.append("green")
    elif arr[j] >= 1200 and arr[j] <= 1599:
        color.append("water")
    elif arr[j] >= 1600 and arr[j] <= 1999:
        color.append("blue")
    elif arr[j] >= 2000 and arr[j] <= 2399:
        color.append("yellow")
    elif arr[j] >= 2400 and arr[j] <= 2799:
        color.append("orange")
    elif arr[j] >= 2800 and arr[j] <= 3199:
        color.append("red")
    elif arr[j] >= 3200:
        over.append("all")

all_num = len(over)
setcolor = list(set(color))
num = len(setcolor)
result = num + all_num

if "all" in over:
    if num == 8:
        print("8 8")
    else:
        if num == 0:
            if all_num >= 8:
                print("1 8")
            else:
                print("1" + " " +str(all_num) )
        if result >= 8 and num != 0:
            print(str(num) + " " + "8")
        elif result < 8 and num != 0:
            print(str(num) + " " +str(result))
else:
    print(str(num) + " " +str(num))