N = int(input())
a = list(map(int,input().split()))
ans = set()
other = 0

for i in a:
    if i <400:
        ans.add("gray")
    elif i <800:
        ans.add("green")
    elif i < 1200:
        ans.add("brown")
    elif i <1600:
        ans.add("light_blue")
    elif i<2000:
        ans.add("blue")
    elif i<2400:
        ans.add("yellow")
    elif i <2800:
        ans.add("orange")
    elif i <3200:
        ans.add("red")
    else:
        other += 1

color = len(ans)
if other + color >=8:
    print(color, " ", 8)
else:
    print(print(color," ",color+other))