n=int(eval(input()))

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

A=list([x//400 if x<3200 else 8 for x in A])

n_red=A.count(8)

n_min=len(set(A))

n_8=1 if n_red else 0

print((1 if n_min==1 and list(set(A))[0]==8 else n_min-n_8,n_min+n_red-n_8))

n=int(eval(input()))

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

A=list([x//400 if x<3200 else 8 for x in A])

n_red=A.count(8)

red_exist=1 if n_red else 0

red_only=1 if red_exist and len(list(set(A)))==1 else 0

n_min=len(set(A)) if not red_exist else len(set(A))-1

print((1 if red_only else n_min,n_min+n_red))

n = int(eval(input()))
A = list(map(int, input().split()))
A = list([x // 400 if x < 3200 else 8 for x in A])
n_red = A.count(8)
n_min = len(set(A))
n_8 = 1 if n_red else 0
print((1 if n_min == 1 and list(set(A))[0] == 8 else n_min - n_8, n_min + n_red - n_8))

n = int(eval(input()))
A = list(map(int, input().split()))
A = list([x // 400 if x < 3200 else 8 for x in A])
n_red = A.count(8)
red_exist = 1 if n_red else 0
red_only = 1 if red_exist and len(list(set(A))) == 1 else 0
n_min = len(set(A)) if not red_exist else len(set(A)) - 1
print((1 if red_only else n_min, n_min + n_red))

-n_min = len(set(A)) -n_8 = 1 if n_red else 0 -print((1 if n_min == 1 and list(set(A))[0] == 8 else n_min - n_8, n_min + n_red - n_8)) +red_exist = 1 if n_red else 0 +red_only = 1 if red_exist and len(list(set(A))) == 1 else 0 +n_min = len(set(A)) if not red_exist else len(set(A)) - 1 +print((1 if red_only else n_min, n_min + n_red))