n = int(eval(input()))

A = list(map(int, input().split()))

c = []

other = 0

for a in A:

    if a< 400:c.append(1)

    elif a < 800: c.append(2)

    elif a < 1200: c.append(3)

    elif a < 1600: c.append(4)

    elif a < 2000: c.append(5)

    elif a < 2400: c.append(6)

    elif a < 2800: c.append(7)

    elif a < 3200: c.append(8)

    else: other+=1

c = set(c)

if c: print((len(c), len(c)+other))

else: print((1, other))
n = int(eval(input()))

A = list(map(int, input().split()))

color = []

other = 0

for a in A:

    if a < 400: color.append(1)

    elif a < 800: color.append(2)

    elif a < 1200: color.append(3)

    elif a < 1600: color.append(4)

    elif a < 2000: color.append(5)

    elif a < 2400: color.append(6)

    elif a < 2800: color.append(7)

    elif a < 3200: color.append(8)

    else: other += 1

c = len(set(color))

if color: print((c, c+other))

else: print((1, other))
n = int(eval(input()))
A = list(map(int, input().split()))
c = []
other = 0
for a in A:
    if a < 400:
        c.append(1)
    elif a < 800:
        c.append(2)
    elif a < 1200:
        c.append(3)
    elif a < 1600:
        c.append(4)
    elif a < 2000:
        c.append(5)
    elif a < 2400:
        c.append(6)
    elif a < 2800:
        c.append(7)
    elif a < 3200:
        c.append(8)
    else:
        other += 1
c = set(c)
if c:
    print((len(c), len(c) + other))
else:
    print((1, other))

n = int(eval(input()))
A = list(map(int, input().split()))
color = []
other = 0
for a in A:
    if a < 400:
        color.append(1)
    elif a < 800:
        color.append(2)
    elif a < 1200:
        color.append(3)
    elif a < 1600:
        color.append(4)
    elif a < 2000:
        color.append(5)
    elif a < 2400:
        color.append(6)
    elif a < 2800:
        color.append(7)
    elif a < 3200:
        color.append(8)
    else:
        other += 1
c = len(set(color))
if color:
    print((c, c + other))
else:
    print((1, other))

-c = [] +color = [] -        c.append(1) +        color.append(1) -        c.append(2) +        color.append(2) -        c.append(3) +        color.append(3) -        c.append(4) +        color.append(4) -        c.append(5) +        color.append(5) -        c.append(6) +        color.append(6) -        c.append(7) +        color.append(7) -        c.append(8) +        color.append(8) -c = set(c) -if c: -    print((len(c), len(c) + other)) +c = len(set(color)) +if color: +    print((c, c + other))