import collections as c

eval(input());a=c.Counter(i//400 for i in [*list(map(int,input().split()))])

b,c=len(set([i for i,j in list(a.items())if i<8])),sum([j for i,j in list(a.items())if i>=8])

print(([b,1][b==0],b+c))

import collections as c

eval(input());a=c.Counter(i//400 for i in [*list(map(int,input().split()))])

b,c=len(set([i for i in list(a.keys())if i<8])),sum([j for i,j in list(a.items())if i>=8])

print(([b,1][b==0],b+c))
import collections as c

eval(input())
a = c.Counter(i // 400 for i in [*list(map(int, input().split()))])
b, c = len(set([i for i, j in list(a.items()) if i < 8])), sum(
    [j for i, j in list(a.items()) if i >= 8]
)
print(([b, 1][b == 0], b + c))

import collections as c

eval(input())
a = c.Counter(i // 400 for i in [*list(map(int, input().split()))])
b, c = len(set([i for i in list(a.keys()) if i < 8])), sum(
    [j for i, j in list(a.items()) if i >= 8]
)
print(([b, 1][b == 0], b + c))

-b, c = len(set([i for i, j in list(a.items()) if i < 8])), sum( +b, c = len(set([i for i in list(a.keys()) if i < 8])), sum(