N = int(input())
Rates = list(map(int, input().split()))
Colors = []
Rainbow = 0

for Rate in Rates:
    if Rate < 400:
        Colors.append("灰色")
    elif Rate < 800:
        Colors.append("茶色")
    elif Rate < 1200:
        Colors.append("緑色")
    elif Rate < 1600:
        Colors.append("水色")
    elif Rate < 2000:
        Colors.append("青色")
    elif Rate < 2400:
        Colors.append("黄色")
    elif Rate < 2800:
        Colors.append("橙色")
    elif Rate < 3200:
        Colors.append("赤色")
    else:
        Rainbow += 1

Color = set(Colors)
print(len(Color) , len(Color) + Rainbow)