def main():
    n, *x = map(int, open(0).read().split())

    a = sum([i < 400 for i in x])
    b = sum([i < 800 for i in x])
    c = sum([i < 1200 for i in x])
    d = sum([i < 1600 for i in x])
    e = sum([i < 2000 for i in x])
    f = sum([i < 2400 for i in x])
    g = sum([i < 2800 for i in x])
    h = sum([i < 3200 for i in x])
    xxx = sum([i >= 3200 for i in x])

    i = [a, (b - a), (c - b), (d - c), (e - d), (f - e), (g - f), (h - g)]
    ans = sum([j > 1 for j in i])
    print(max(ans, 1), min(8, ans + xxx))


if __name__ == '__main__':
    main()
