N= int(input())
A = list(map(int, input().split()))
che = []
for i in range(N):
    if A[i] <= 399:
        che.append("hai")
    elif A[i] >= 400 and A[i] <= 799:
        che.append("cha")
    elif A[i] > 799 and A[i] <= 1199:
        che.append("mid")
    elif A[i] > 1199 and A[i] <= 1599:
        che.append("miz")
    elif A[i] > 1599 and A[i] <= 1999:
        che.append("ao")
    elif A[i] > 1999 and A[i] <= 2399:
        che.append("kii")
    elif A[i] > 2399 and A[i] <= 2799:
        che.append("dau")
    elif A[i] > 2799 and A[i] <= 3199:
        che.append("aka")
    else:
        che.append("wid")
#print(che)
result = set(che)

if "wid" in result == "False":
    print(len(result),len(result))
elif "wid" in result == "True" and len(result) == 9:
    print(len(result)-1,len(result)-1)
elif "wid" in result == "True" and len(result) == 8:
    print(len(result)-1,len(result))
elif "wid" in result == "True" and len(result) <= 8:
    print(len(result)-1,len(result)+1)
else:
    print(len(result),len(result))