def rate(n):
    if n < 399:
        return "gray"
    elif n < 799:
        return "brown"
    elif n < 1199:
        return "green"
    elif n < 1599:
        return "water"
    elif n < 1999:
        return "blue"
    elif n < 2399:
        return "yellow"
    elif n < 2799:
        return "orange"
    elif n < 3199:
        return "red"
    else:
        return "pro"

n = int(input())
a = list(map(int, input().split()))
ans = []

for i in a:
    ans.append(rate(i))

pro = ans.count("pro")
ANS = set(ans)
ANS.discard("pro")
MIN = len(ANS)
MAX = MIN + pro

print(max(MIN, 1), MAX)