In AtCoder, a person who has participated in a contest receives a color, which corresponds to the person's rating as follows:  
 - Rating 1-399 : gray
 - Rating 400-799 : brown
 - Rating 800-1199 : green
 - Rating 1200-1599 : cyan
 - Rating 1600-1999 : blue
 - Rating 2000-2399 : yellow
 - Rating 2400-2799 : orange
 - Rating 2800-3199 : red
Other than the above, a person whose rating is 3200 or higher can freely pick his/her color, which can be one of the eight colors above or not.

Currently, there are N users who have participated in a contest in AtCoder, and the i-th user has a rating of a_i.

Find the minimum and maximum possible numbers of different colors of the users.  

-----Constraints-----
 - 1 ≤ N ≤ 100
 - 1 ≤ a_i ≤ 4800
 - a_i is an integer.

-----Input-----
Input is given from Standard Input in the following format:
N
a_1 a_2 ... a_N

-----Output-----
Print the minimum possible number of different colors of the users, and the maximum possible number of different colors, with a space in between.  

-----Sample Input-----
4
2100 2500 2700 2700

-----Sample Output-----
2 2

The user with rating 2100 is "yellow", and the others are "orange". There are two different colors.

Difficulty: introductory

Starter code:

Solutions:
n = int(input())
a = list(map(int, input().split()))

ans = 0
t = 400
while t < 3201:
  for i in a:
    if i >= t-400 and i < t:
      ans += 1
      break
  t += 400

s = 0
for i in a:
  if i >= 3200: s += 1

if ans == 0: print(1, s)
else: print(ans, ans+s)

n=int(input())
a=list(map(int,input().split()))
count=0
ans=1
color_lis=[0,0,0,0,0,0,0,0]
for i in range(n):
  if a[i]//400>=8:
    count+=1
  else:
    color_lis[a[i]//400]=1
ans=sum(color_lis)
if count>0:
  flag=1
else:
  flag=0
ans1 = max(flag,ans)
ans2 = ans+count
print(ans1,ans2)

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

color=[]
free=0
Sans,Mans=0,0
for i in a:
    if i//400<8 and i//400 not in color:
        color.append(i//400)
        Sans+=1
    elif i>=3200:
        free+=1
        
#Mans=Sans
#if free+Sans>=8:
 #   Mans=8
#else:
 #   Mans=Sans+free

Mans=Sans+free
if Sans==0:
    Sans=1
print(Sans,Mans)

n = int(input())
a = list(map(int,input().split()))
rate = [0,399,799,1199,1599,1999,2399,2799,3199,4800]
cnt = [0]*9

for i in a:
    for j in range(1,len(rate)+1):
        if rate[j-1] < i <= rate[j]:
            cnt[j-1] += 1

fix = 0
flex = 0
for i,result in enumerate(cnt):
    if i == 8:
        flex = cnt[i]
    elif result > 0:
        fix += 1

if fix == 0 and flex >= 1:
    print(1,flex)
else:
    print(fix,fix+flex)

N=int(input())
List = list(map(int, input().split()))
sumList = [0]*8
mid = 0
for i in range(N):
  if 1<=List[i]<=399:
    sumList[0] += 1
  elif 400<= List[i] <=799:
    sumList[1] += 1
  elif 800 <= List[i] <= 1199:
    sumList[2] += 1
  elif 1200<= List[i] <=1599:
    sumList[3] += 1
  elif 1600<= List[i] <=1999:
    sumList[4] += 1
  elif 2000 <= List[i] <= 2399:
    sumList[5] += 1
  elif 2400 <= List[i] <= 2799:
    sumList[6] += 1
  elif 2800 <= List[i] <= 3199:
    sumList[7] += 1
  elif 3200 <= List[i]:
    mid += 1
res1 = 8 - sumList.count(0)
res2 = res1 + mid
if res1 == 0 and mid > 0:
  res1 = 1
print(res1,res2)

n=int(input())
a=list(map(int,input().split()))
l = [0]*9
cnt = 0
for i in a:
        if i <400:
                l[0] +=1
        elif i<800:
                l[1] +=1
        elif i < 1200:
                l[2] +=1
        elif i<1600:
                l[3] +=1
        elif i < 2000:
                l[4] +=1
        elif i<2400:
                l[5] +=1
        elif i < 2800:
                l[6] +=1
        elif i<3200:
                l[7] +=1 
        else:
                l[8] +=1
for i in range(8):
        if l[i] >=1:
                cnt +=1

if cnt == 0:
        print(1,l[8])
else:
        print(cnt,cnt+l[8])

N = int(input())
a = list(map(int, input().split()))

color = []
rainbow = 0

for i in range(N):
    if 1 <= a[i] <= 399:
        color.append('gray')
    elif 400 <= a[i] <= 799:
        color.append('brown')
    elif 800 <= a[i] <= 1199:
        color.append('green')
    elif 1200 <= a[i] <= 1599:
        color.append('sky')
    elif 1600 <= a[i] <= 1999:
        color.append('blue')
    elif 2000 <= a[i] <= 2399:
        color.append('yellow')
    elif 2400 <= a[i] <= 2799:
        color.append('orange')
    elif 2800 <= a[i] <= 3199:
        color.append('red')
    else:
        rainbow += 1
        color.append('all')

if len(set(color)) == 1 and rainbow > 0:
    mini = 1
elif rainbow == 0:
    mini = len(set(color))
else:
    mini = max(1, len(set(color))-1)

if rainbow > 1:
    maxi = len(set(color)) + rainbow - 1
else:
    maxi = len(set(color))

print(mini, maxi)

N=int(input())
List = list(map(int, input().split()))
sumList = [0]*8
mid = 0
for i in range(N):
  if 1<=List[i]<=399:
    sumList[0] += 1
  elif 400<= List[i] <=799:
    sumList[1] += 1
  elif 800 <= List[i] <= 1199:
    sumList[2] += 1
  elif 1200<= List[i] <=1599:
    sumList[3] += 1
  elif 1600<= List[i] <=1999:
    sumList[4] += 1
  elif 2000 <= List[i] <= 2399:
    sumList[5] += 1
  elif 2400 <= List[i] <= 2799:
    sumList[6] += 1
  elif 2800 <= List[i] <= 3199:
    sumList[7] += 1
  elif 3200 <= List[i]:
    mid += 1
res1 = 8 - sumList.count(0)
res2 = res1 + mid
if res1 == 0 and mid > 0:
  res1 = 1
print(res1,res2)

n = int(input())
rate = list(map(int, input().split()))
v = [0] * 9

for i in range(n):
  c = int(rate[i]/400)
  if c >= 8:
    v[8] += 1
  else:
    v[c] = 1
s = sum(v[:8])
mi = max(1, s)
ma = s+v[8]

print(mi, ma)

N = int(input())
R = list(map(int, input().split()))
X = [0]*8
p = 0
for r in R:
  if r >= 3200:
    p += 1
  else:
    X[r//400] = 1

s = sum(X)
if s == 0:
  print((str(1) + " " + str(p)))
else:
  print((str(s) + " " + str(s + p)))


N = int(input())
A = list(map(int,input().split()))
R = [0]*9

for a in A:
  if a<400:
    R[0]+=1
  elif a<800:
    R[1]+=1
  elif a<1200:
    R[2]+=1
  elif a<1600:
    R[3]+=1
  elif a<2000:
    R[4]+=1
  elif a<2400:
    R[5]+=1
  elif a<2800:
    R[6]+=1
  elif a<3200:
    R[7]+=1
  else:
    R[8]+=1

if sum(R[:-1])!=0:
  M = 8-R[:-1].count(0)+R[-1]
  m = 8-R[:-1].count(0)
  print(m,M)
else:
  print(1,R[-1])

#8 C - Colorful Leaderboard
N = int(input())
a = list(map(int,input().split()))

seen = [False]*8
cnt = 0
cnt_3200 = 0
for i in a:
    i = i//400
    if i >= 8:
        cnt_3200 += 1
    elif (seen[i] == False):
        cnt += 1
        seen[i] = True
    
if cnt == 0:
    print(1,cnt_3200)
else:
    print(cnt,cnt+cnt_3200)

N=int(input())
L=list(map(int,input().split()))
L=[i//400 for i in L]
a=[i for i in L if i<8]
b=[i for i in L if i>7]
a=len(set(a))
b=len(b)
if a==0:
  mi=1
  ma=b
else:
  mi=a
  ma=mi+b
print(mi,ma)

a=int(input())
b=list(map(int,input().split()))
c=0
d=0
e=0
f=0
g=0
h=0
i=0
j=0
k=0
x=0
for z in range(a):
  if b[z]<=399:
    c=c+1
  if 400<=b[z]<799:
    d=d+1
  if 800<=b[z]<=1199:
    e=e+1
  if 1200<=b[z]<=1599:
    f=f+1
  if 1600<=b[z]<=1999:
    g=g+1
  if 2000<=b[z]<=2399:
    h=h+1
  if 2400<=b[z]<=2799:
    i=i+1
  if 2800<=b[z]<=3199:
    j=j+1
  if b[z]>=3200:
    k=k+1
if c!=0:
  x=x+1
if d!=0:
  x=x+1
if e!=0:
  x=x+1
if f!=0:
  x=x+1
if g!=0:
  x=x+1
if h!=0:
  x=x+1
if i!=0:
  x=x+1
if j!=0:
  x=x+1
if k+x>a:
  print(x,a)
elif (c+d+e+f+g+h+i+j)==0 and k!=0:
  print(1,k)
else:
  print(x,k+x)

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

cnt = [0]*8
c = 0
for a in A:
    if a <= 399:
        cnt[0] += 1
    elif a >= 400 and a <= 799:
        cnt[1] += 1
    elif a >= 800 and a <= 1199:
        cnt[2] += 1
    elif a >= 1200 and a <= 1599:
        cnt[3] += 1
    elif a >= 1600 and a <= 1999:
        cnt[4] += 1
    elif a >= 2000 and a <= 2399:
        cnt[5] += 1
    elif a >= 2400 and a <= 2799:
        cnt[6] += 1
    elif a >= 2800 and a <= 3199:
        cnt[7] += 1
    else:
        c += 1
        
Min = len([i for i in cnt if i != 0])
if c == 0:
    print(Min, Min)
else:
    Max = Min+c
    if Min == 0:
        print(1, Max)
    else:
        print(Min, Max)

N=int(input())
a=list(map(int,input().split()))
ans=[0 for i in range(9)]

for i in range(N):
    temp=a[i]//400
    if temp>8:
        ans[8]+=1
    else:
        ans[temp]+=1
nin=0
for i in range(8):
    if ans[i]!=0:
        nin+=1
if nin==0 and ans[8]!=0:
    nin+=1
    nax=ans[8]
else:
    nax=nin+ans[8]
print(nin,nax)

n=int(input())
a=list(map(int,input().split()))
a1=0
b=0
c=0
d=0
e=0
f=0
g=0
h=0
ans=0
for i in range(n):
  if 1<=a[i]<=399:
    a1=1
  elif 400<=a[i]<=799:
    b=1
  elif 800<=a[i]<=1199:
    c=1
  elif 1200<=a[i]<=1599:
    d=1
  elif 1600<=a[i]<=1999:
    e=1
  elif 2000<=a[i]<=2399:
    f=1
  elif 2400<=a[i]<=2799:
    g=1
  elif 2800<=a[i]<=3199:
    h=1
  else:
    ans+=1

x=a1+b+c+d+e+f+g+h
if a1==b==c==d==e==f==g==h==0:
  print(1,ans)
else:
  print(x,x+ans)

N = int(input())
a = list(map(int, input().split()))

color = [0]*8
freer=0

for i in a:
    if i<3200:
        color[i//400]+=1
    else:
        freer+=1
        
ans_base = 8-color.count(0)

if ans_base==0:
    ans_min = 1
else:
    ans_min = ans_base
    
ans_max = ans_base+freer
        
print(ans_min, ans_max)

N = int(input())
lsa = list(map(int,input().split()))
lsb = []
joker = 0
for i in lsa:
    if i >=1 and i <=399:
        lsb.append('1')
    elif i >=400 and i <=799:
        lsb.append('2')
    elif i >=800 and i <=1199:
        lsb.append('3')
    elif i >=1200 and i <=1599:
        lsb.append('4')
    elif i >=1600 and i <=1999:
        lsb.append('5')
    elif i >=2000 and i <=2399:
        lsb.append('6')
    elif i >=2400 and i <=2799:
        lsb.append('7')
    elif i >=2800 and i <=3199:
        lsb.append('8')
    elif i >=3200:
        joker += 1
s1 = len(set(lsb)) 
s2 = s1+joker
print(max(s1,1),s2)

n = int(input())
player = list(map(int, input().split()))
result = [0] * 8
free_color = 0
for i in range(n):
    color = player[i] // 400
    if color < 8:
        result[color] = 1
    else:
        free_color += 1
num = 8 - result.count(0)
print(("{} {}".format(max(num, 1), num + free_color)))


# -*- coding: utf-8 -*-
"""
Created on Tue Sep 22 04:19:50 2020

@author: liang
"""

N = int(input())
A = [int(x) for x in input().split()]
d = [False]*8
count = 0
ans = 0
for a in A:
    if a//400 >= 8:
        count += 1
    else:
        if d[a//400] == False:
            ans += 1
            d[a//400] = True

if count == 0:
    print(ans,ans)
else:
    if ans == 0:
        print(1,count)
    else:
        print(ans,ans+count)

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

arr = [0] * 9
ans = [0] * 2

for i in a:
    if i//400 < 8:
        arr[i//400] = 1
    else:
        arr[8] += 1

left = sum(arr[:8])
right = arr[8]

ans[0] = left

if left == 0:
    ans[0] = 1

ans[1] = left + right

print(*ans)

n=int(input())
a=list(map(int,input().split()))
b=[0]*8
c=0
for x in a:
  if x<400:
    b[0]=1
  elif x<800:
    b[1]=1
  elif x<1200:
    b[2]=1
  elif x<1600:
    b[3]=1
  elif x<2000:
    b[4]=1
  elif x<2400:
    b[5]=1
  elif x<2800:
    b[6]=1
  elif x<3200:
    b[7]=1
  else:
    c+=1
x=b.count(1)
print(max(x,1),x+c)

n=int(input())
a=list(map(int,input().split()))
color=[]
count,free=0,0

for i in range(n):
    c=a[i]//400
    if a[i]<3200 and c not in color:
        color.append(c)
        count+=1
    elif a[i]>=3200:
        free+=1
      
min,max=0,0
if count==0:
    max=free
    min=1
else:
    max=count+free
    min=count
    
print(min,max)

N,*A=map(int,open(0).read().split())

colors = [0 for i in range(8)]
tyty = 0

for a in A:
  c = a//400
  if c>=8:
    tyty+=1
  else:
    colors[c]+=1

cNum = 8-colors.count(0)
    
minC = max(cNum,1)
maxC = cNum+tyty

print(minC,maxC)

N = int(input())
A = list(map(int,input().split()))
L = []
H = []

for i in range(N):
  a = A[i]//400
  if a > 7:
    H.append(a)
  else:
    L.append(a)

if len(L) != 0:
  print(str(len(set(L)))+" "+str(len(set(L))+len(H)))
else:
  print("1 "+str(len(H)))

N = int(input())
a = list(map(int, input().split()))

c = [0] * 9
for i in range(N):
    if a[i] >= 3200:
        c[8] += 1
    else:
        for j in range(8):
            if 400*j <= a[i] and a[i] <= 400 * (j + 1) -1:
                c[j] = 1

min1 = max(1, sum(c[:8]))
max1 = sum(c)

print(min1, max1)

#上限ないんかい
#0色はなかった
'''
Created on 2020/10/01

@author: harurun
'''
import sys
pin=sys.stdin.readline

def main():
  N=int(pin())
  a=list(map(int,pin().split()))
  d=[0]*9
  for i in a:
    if i>=3200:
      d[-1]+=1
      continue
    d[i//400]+=1
  ans=0
  for i in d[:-1]:
    if i!=0:ans+=1
  if ans==0:
    print(f"{1} {d[-1]}")
    return
  print(f"{ans} {ans+d[-1]}")
  return
main()


with open(0) as f:
    N, *a = list(map(int, f.read().split()))
Set = set()
free = 0
for x in a:
    x //= 400
    if x < 8:
        Set.add(x)
    else:
        free += 1

Ans = [max(1, len(Set)), len(Set)+free]
print((*Ans))


n = int(input())
a = list(map(int, input().split()))
rates = [0] * 8
cnt = 0

for i in range(n):
  if a[i] < 3200:
    rates[a[i] // 400] += 1
  else:
    cnt += 1
    
cn = len(rates) - rates.count(0) #color number
if sum(rates) == 0:
  cmin = 1
else:
  cmin = cn #color min

if all([x < 3200 for x in a]):
  cmax = cn #color max
else:
  cmax = cn + cnt
  
print(cmin,cmax)

import math

N = int(input())
A = [math.floor(a/400) if a < 3200 else 3200 for a in list(map(int, input().split()))]

set_A = set([a for a in A if a != 3200])
print(*[max(1, len(set_A)), len(set_A) + A.count(3200)], sep=" ")

from sys import stdin, stdout # only need for big input

def get_level(n):
    return min( n // 400, 8)

def solve():
    n = int(input()) 
    a = list(map(int, input().split()))
    level_num = dict()
    for i in range(9):
        level_num[i] = 0
    
    for contestant in a:
        lvl = get_level(contestant)
        level_num[lvl] += 1

    min_num = 0

    for lvl in level_num:
        if level_num[lvl] > 0 and lvl < 8:
            min_num += 1
    max_num = min_num + level_num[8]
    if min_num < 1:
        min_num = 1
    # if max_num > 8:
        # max_num = 8

    print(min_num, max_num)
        


    

def main():
    solve()


def __starting_point():
    main()
__starting_point()

N = int(input())
N_List = list(map(int,input().split()))
NR_List = [i // 400 for i in N_List]
Number_NRD = len(set([i for i in NR_List if i < 8]))
Number_NRU = len([i for i in NR_List if i >= 8])
max_p= Number_NRD + Number_NRU
min_p= (Number_NRD,1)[Number_NRD == 0]
print(str(min_p) + " " + str(max_p))

n = int(input())
a = sorted(map(int,input().split()))

c = [0] * 9
for num in a:
    if num < 400:
        c[0] += 1
    elif num < 800:
        c[1] += 1
    elif num < 1200:
        c[2] += 1
    elif num < 1600:
        c[3] += 1
    elif num < 2000:
        c[4] += 1
    elif num < 2400:
        c[5] += 1
    elif num < 2800:
        c[6] += 1
    elif num < 3200:
        c[7] += 1
    else:
        c[8] += 1
mi = 0
ma = 0
for i in range(8):
    if c[i] >= 1:
        mi += 1
        ma += 1
ma += c[8]
if mi == 0:
    if c[8] >= 1:
        mi += 1
print((str(mi) + " " + str(ma)))



def cordtest(AAA):
  jisyo ={'H':0,'C':0,'G':0,'M':0,'B':0,'Y':0,'O':0,'R':0,'A':0}
  for i in AAA:
    
    if i <= 399:
      jisyo['H'] +=1
    elif 400 <= i <=799:
      jisyo['C'] +=1
    elif 800 <= i <=1199:
      jisyo['G'] +=1
    elif 1200 <= i <=1599:
      jisyo['M'] +=1
    elif 1600 <= i <=1999:
      jisyo['B'] +=1
    elif 2000 <= i <=2399:
      jisyo['Y'] +=1
    elif 2400 <= i <= 2799:
      jisyo['O'] +=1
    elif 2800 <= i <= 3199:
      jisyo['R'] +=1
    else:
      jisyo['A'] +=1
  maxi = 0
  mini = 0
  for i,j in jisyo.items():
    
    if i != 'A':
      if j >0:
        mini +=	1
    else:
      maxi += j
  ans = maxi + mini
  if mini ==0:
    mini =1
  
  return print(mini,ans)
N = int(input())
AA = list(map(int,input().split()))
cordtest(AA)
      
      
  

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

rate=[0]*9
over=0

for i in a:
  for j in range(1,9):
    if 400*(j-1) <= i < 400*j:
      rate[j]=1
      break
    elif i >= 3200:
      over+=1
      break

ansmin = rate.count(1)
ansmax = rate.count(1)
if ansmin == 0:
  ansmin=1

if over > 0:
  ansmax += over
    
#print(rate,over)
print(ansmin, ansmax)

n = int(input())
rates = map(int,input().split())

colors = set()
over = 0
for rate in rates:
    if 1<=rate and rate<=399:
        colors.add("1-399")
    if 400<=rate and rate<=799:
        colors.add("400-799")
    if 800<=rate and rate<=1199:
        colors.add("800-1199")
    if 1200<=rate and rate<=1599:
        colors.add("1200-1599")
    if 1600<=rate and rate<=1999:
        colors.add("1600-1999")
    if 2000<=rate and rate<=2399:
        colors.add("2000-2399")
    if 2400<=rate and rate<=2799:
        colors.add("2400-2799")
    if 2800<=rate and rate<=3199:
        colors.add("2800-3199")
    if 3200<=rate:
        over+=1

min=len(colors)
max=min+over
# if max>8:
#     max=8
if min==0:
    min=1
print(min,max)

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

color = [0] * 9

for a in A:
  if a <= 399:
    color[0] = 1
  elif a <= 799:
    color[1] = 1
  elif a <= 1199:
    color[2] = 1
  elif a <= 1599:
    color[3] = 1
  elif a <= 1999:
    color[4] = 1
  elif a <= 2399:
    color[5] = 1
  elif a <= 2799:
    color[6] = 1
  elif a <= 3199:
    color[7] = 1
  else:
    color[8] += 1
    
max_num = sum(color)
min_num = max(1, sum(color[:-1]))
 
print(min_num, max_num)

N = int(input())
a = list(map(int, input().split()))

rate = set()
over = 0
for ai in a:
    if ai >= 3200:
        over += 1
    else:
        rate.add(ai // 400)

L = len(rate)
print(max(1, L), L + over)

N = int(input())
rate = list(map(int,input().split()))
cnt = 0
ans = []
for i in range(N):
    if rate[i] >= 3200:
        cnt += 1
    else:
        ans.append(rate[i]//400)
s_ans = set(ans)
print(max(len(s_ans),1),len(s_ans)+cnt)

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

upper = [399, 799, 1199, 1599, 1999, 2399, 2799,3199, 4800]
lower = [1, 400, 800, 1200, 1600, 2000, 2400, 2800, 3200]

cnt = 0
tops = 0
for color in range(9)[::-1]:
    for i in range(n):
        if color == 8:
            if lower[color] <= a[i] <= upper[color]:
                tops += 1
        else:
            if lower[color] <= a[i] <= upper[color]:
                cnt += 1
                break

print(max(1, cnt), cnt + tops)

N = int(input())
a = list(map(int, input().split()))

color = [0] * 9
for i in range(N):
    if 1<=a[i]<=399: color[0]+=1
    elif 400<=a[i]<=799: color[1]+=1
    elif 800<=a[i]<=1199: color[2]+=1
    elif 1200<=a[i]<=1599: color[3]+=1
    elif 1600<=a[i]<=1999: color[4]+=1
    elif 2000<=a[i]<=2399: color[5]+=1
    elif 2400<=a[i]<=2799: color[6]+=1
    elif 2800<=a[i]<=3199: color[7]+=1
    elif 3200<= a[i]: color[8] += 1

count = 0
for i in range(8):
    if color[i] != 0:
        count += 1
if count == 0:
    print(1, count+color[8])
else:
    print(count, count+color[8])

#C - Colorful Leaderboard 
N = int(input())
a = list(map(int,input().split()))

mini = 0
color_list = []
for i in a:
    if (i//400)<8 and ((i//400 in color_list) == False):
        mini += 1
        color_list.append(i//400)

maxi = mini
for j in a:
    if j >= 3200:
        maxi += 1
if mini == 0:#忘れてた
    mini = 1
print(mini,maxi)

n = int(input())
a = list(map(int,input().split()))
colors = ["灰色","茶色","緑色","水色","青色","黄色","橙色","赤色","その他"]
dic = {}
for i in colors:
  dic[i] = 0
for i in a:
  if i < 400:
    dic["灰色"] += 1
  elif i < 800:
    dic["茶色"] += 1
  elif i < 1200:
    dic["緑色"] += 1
  elif i < 1600:
    dic["水色"] += 1
  elif i < 2000:
    dic["青色"] += 1
  elif i < 2400:
    dic["黄色"] += 1
  elif i < 2800:
    dic["橙色"] += 1
  elif i < 3200:
    dic["赤色"] += 1
  else:
    dic["その他"] += 1

ans1 = 0
ans2 = 0

for i in colors:
  if i == "その他":
    if ans1 == 0:
      ans1 = 1
      ans2 = dic[i]
      break
    ans2 += dic[i]
    continue
  if dic[i] >= 1:
      ans1 += 1
      ans2 += 1
print(ans1,ans2)

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

s = set()
b = 0
for i in a:
    if i < 3200:
        s.add(i//400)
    else:
        b += 1
else:
    min = len(s)
    print(max(min, 1), min + b)

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

rate = [0] * 8
s = 0

for i in a:
    if i < 400:
        rate[0] = 1
    elif 400 <= i < 800:
        rate[1] = 1
    elif 800 <= i < 1200:
        rate[2] = 1
    elif 1200 <= i < 1600:
        rate[3] = 1
    elif 1600 <= i < 2000:
        rate[4] = 1
    elif 2000 <= i < 2400:
        rate[5] = 1
    elif 2400 <= i < 2800: 
        rate[6] = 1
    elif 2800 <= i < 3200:
        rate[7] = 1
    elif 3200 <= i:
        s += 1



    
ans1 = 8-rate.count(0)
ans2 = ans1+s
if ans1 == 0 and s != 0:
    ans1 = 1


print(ans1, ans2)

n = int(input())
arr = list(map(int, input().split()))

colors = [0] * 8
over = 0

for i in arr:
    if i >= 3200:
        over += 1
    else:
        colors[i // 400] += 1

res = 8 - colors.count(0)
if res:
    print(res, res+over)
else:
    print(1, over)

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

cnt = [0] * 9
for i in a:
    x = min(i // 400, 8)
    if x >= 8:
        cnt[8] += 1
    else:
        cnt[x] = 1

if sum(cnt[:8]) == 0:
    l = 1
    r = cnt[8]
else:
    l = sum(cnt[:8])
    r = l+cnt[8]
print(l, r)

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

p = set()
q = 0
for i in range(n):
  if a[i] < 3200:
    p.add(a[i]//400)
  else:
    q += 1

p = len(p)
print(max(p, 1), p+q)

n=int(input())
a=list(map(int,input().split()))
data=[0]*9
for i in a:
  if 1<=i<=399:
    data[0]+=1
  elif 400<=i<=799:
    data[1]+=1
  elif 800<=i<=1199:
    data[2]+=1
  elif 1200<=i<=1599:
    data[3]+=1
  elif 1600<=i<=1999:
    data[4]+=1
  elif 2000<=i<=2399:
    data[5]+=1
  elif 2400<=i<=2799:
    data[6]+=1
  elif 2800<=i<=3199:
    data[7]+=1
  elif 3200<=i:
    data[8]+=1
min=0
for i in range(8):
  if data[i]!=0:
    min+=1
if min!=0:
  print(min,min+data[8])
else:
  print(1,data[8])

N = int(input())
A = list(map(int, input().split()))
rate = {"a":0, "b":0, "c":0, "d":0, "e":0, "f":0, "g":0, "h":0}
ratez = {"z":0}
for i in range(N):
    if A[i] >=1 and A[i] <= 399:
        rate["a"] += 1
    if A[i] >=400 and A[i] <= 799:
        rate["b"] += 1
    if A[i] >=800 and A[i] <= 1199:
        rate["c"] += 1
    if A[i] >=1200 and A[i] <= 1599:
        rate["d"] += 1
    if A[i] >=1600 and A[i] <= 1999:
        rate["e"] += 1
    if A[i] >=2000 and A[i] <= 2399:
        rate["f"] += 1
    if A[i] >=2400 and A[i] <= 2799:
        rate["g"] += 1
    if A[i] >=2800 and A[i] <= 3199:
        rate["h"] += 1
    if A[i] >=3200:
        ratez["z"] += 1
keys = [k for k, v in rate.items() if v != 0]

if ratez["z"] == 0:
    print(len(keys), len(keys))
elif len(keys) == 0:
    print(1, ratez["z"])
else:
    print(len(keys), len(keys)+ratez["z"])

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

rate = [0 for _ in range(9)]

for a in A:
    if a < 400:
        rate[0] += 1
    elif a < 800:
        rate[1] += 1
    elif a < 1200:
        rate[2] += 1
    elif a < 1600:
        rate[3] += 1
    elif a < 2000:
        rate[4] += 1
    elif a < 2400:
        rate[5] += 1
    elif a < 2800:
        rate[6] += 1
    elif a < 3200:
        rate[7] += 1
    else:
        rate[8] += 1

ans = 0
for i in range(8):
    if rate[i] >= 1:
        ans += 1
if ans == 0:
    print(1, rate[8])
else:
    print(ans, ans + rate[8])

n=int(input())
a=list(map(int,input().split()))
b=[0]*9
for i in range(n):
  if a[i]<400:
    b[0]+=1
  elif a[i]<800:
    b[1]+=1
  elif a[i]<1200:
    b[2]+=1
  elif a[i]<1600:
    b[3]+=1
  elif a[i]<2000:
    b[4]+=1
  elif a[i]<2400:
    b[5]+=1
  elif a[i]<2800:
    b[6]+=1
  elif a[i]<3200:
    b[7]+=1
  else:
    b[8]+=1
    
min=8-b[:8].count(0)
max=min+b[8]

if min==0:
  min=1
print(min,max)

N = int(input())
A = list(map(int, input().split()))
B = [i // 400 for i in A if i < 3200]
if B == []:
  print(1, N)
elif len(B) == N:
  C = len(set(B))
  print(C, C)
else:
  C = len(set(B))
  D = C + N - len(B)
  print(C, D)

import numpy as np
N = int(input())
a = np.array(list(map(int, input().split())))
a = a // 400

over_3200 = a[np.where(a>=8)]
num_3200 = len(over_3200)

a = a[np.where(a<=7)]
a_list = np.unique(a)
len_a = len(a_list)

if len_a == 0:
    min = 1
    num_3200 -= 1
else:
    min = len_a

max = min + num_3200
print(min, max)

N = int(input())
rate = [1, 400, 800, 1200, 1600, 2000, 2400, 2800, 3200]
p = [0] * 9

A = [int(a) for a in input().split(" ")]
A.sort()

j = 0
for i in range(len(A)):
  while j < 8:
    if rate[j] <= A[i] < rate[j + 1]:
      p[j] = 1
      break
    else:
      j += 1
  else:
    p[8] = len(A[i:])
    break

print((str(max([sum(p[:8]), 1])) + " " + str(sum(p))))


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

cnt = [0] * 9
for i in a:
    x = min(i // 400, 8)
    if x >= 8:
        cnt[8] += 1
    else:
        cnt[x] = 1

if sum(cnt[:8]) == 0:
    l = 1
    r = cnt[8]
else:
    l = sum(cnt[:8])
    r = l+cnt[8]
print(l, r)

def color(n):
    if n < 400:
        return '灰'
    elif n < 800:
        return '茶'
    elif n < 1200:
        return '緑'
    elif n < 1600:
        return '水'
    elif n < 2000:
        return '青'
    elif n < 2400:
        return '黄'
    elif n < 2800:
        return '橙'
    elif n < 3200:
        return '赤'
    else:
        return None


N = int(input())
a = list(map(int, input().split()))

colors = set()
over = 0

for c in a:
    if color(c):
        colors.add(color(c))
    else:
        over += 1

print(max(1, len(colors)), end=' ')
print(len(colors)+over)

n=int(input())
l=list(map(int,input().split()))

ans=[0 for i in range(8)]
rate_3200=0

for i in l:
  if 1<=i<=399:
    ans[0]+=1
  elif 400<=i<=799:
    ans[1]+=1
  elif 800<=i<=1199:
    ans[2]+=1
  elif 1200<=i<=1599:
    ans[3]+=1
  elif 1600<=i<=1999:
    ans[4]+=1
  elif 2000<=i<=2399:
    ans[5]+=1
  elif 2400<=i<=2799:
    ans[6]+=1
  elif 2800<=i<=3199:
    ans[7]+=1
  elif 3200<=i:
    rate_3200+=1
    
if rate_3200==0:
  num=8-ans.count(0)
  print(("{} {}".format(num,num)))
else:
  count_0=ans.count(0)
  if count_0==8:
    min_num=1
    max_num=rate_3200
  else:
    min_num=8-count_0
    max_num=8-count_0+rate_3200
  print(("{} {}".format(min_num,max_num)))


N = int(input())
a = list(map(int, input().split()))
color = set()
rainbow = 0

for n in range(N):
  if 1 <= a[n] < 400:
    color.add("gray")
  elif 400 <= a[n] < 800:
    color.add("brown")
  elif 800 <= a[n] < 1200:
    color.add("green")
  elif 1200<= a[n] < 1600:
    color.add("water")
  elif 1600 <= a[n] < 2000:
    color.add("blue")
  elif 2000 <= a[n] < 2400:
    color.add('yellow')
  elif 2400 <= a[n] < 2800:
    color.add('orange')
  elif 2800 <= a[n] < 3200:
    color.add('red')
  else:
    rainbow += 1

if len(color) == 0:
	color_min = 1 
	color_max = rainbow
else:
  color_min = len(color)
  color_max = color_min + rainbow

    
print(f'{color_min} {color_max}')


n = int(input())
al = list(map(int, input().split()))
ratel = [0,0,0,0,0,0,0,0,0]

def check(a):
    if 1 <= a <= 399:
        return 0
    elif 400 <= a <= 799:
        return 1
    elif 800 <= a <= 1199:
        return 2
    elif 1200 <= a <= 1599:
        return 3
    elif 1600 <= a <= 1999:
        return 4
    elif 2000 <= a <= 2399:
        return 5
    elif 2400 <= a <= 2799:
        return 6
    elif 2800 <= a <= 3199:
        return 7
    else:
        return 8

for a in al:
    i = check(a)
    ratel[i] += 1


zeroc = 0
ratec = 0
for i in range(8):
    if ratel[i] == 0:
        zeroc += 1
    else:
        ratec += 1

if ratel[8] == 0:
    print(ratec,ratec)
elif 1 <= ratel[8] <= 8:
    if ratec == 0:
        print(1,ratel[8])
    elif ratel[8] < zeroc:
        print(ratec, ratec+ratel[8])
    elif ratel[8] >= zeroc:
        print(ratec,ratec+ratel[8])
else:
    if ratec == 0:
        print(1,ratel[8])
    else:
        print(ratec,ratec+ratel[8])

n = int(input())
a = list(map(int,input().split()))
cnt = [0]*8
free = 0
for i in range(n):
    if a[i] <= 3199:
        cnt[a[i]//400] += 1
    else:
        free += 1
print(max(1,8-cnt.count(0)),8-cnt.count(0)+free)

N = int(input())
A = list(map(int, input().split()))
cin = [0, 0, 0, 0, 0, 0, 0, 0]
kin = 0
pin = 0
flag = 0
for i in A:
    if i < 3200:
        cin[i//400] += 1
        pin = 1
    else:
        kin += 1
        flag = 1
if pin == 0:
    print(1, kin)
else:
    print(8-cin.count(0), 8-cin.count(0)+kin)

N=int(input())
a=list(map(int,input().strip().split()))

c=[0 for n in range(8)]
f=0
for n in range(N):
    tmp=a[n]//400
    if tmp>=8:
        f+=1
    else:
        if c[tmp]==0:
            c[tmp]+=1
MIN=max(sum(c),1)
MAX=sum(c)+f
print((str(MIN)+" "+str(MAX)))


def index(rate):
    if rate <= 3199:
        idx = rate // 400
    else:
        idx = 'free'
    return idx


def main():
    n = int(input())
    a_lst = list(map(int, input().split()))
    color_lst = [0] * 8

    free = 0
    for i in range(n):
        rate = a_lst[i]
        idx = index(rate)
        if idx == 'free':
            free += 1
        else:
            color_lst[idx] = 1

    types = 0
    for i in range(8):
        if color_lst[i] == 1:
            types += 1

    if types > 0:
        minimum = types
    else:
        minimum = 1

    maximum = types
    max_add = free
    maximum += max_add

    print(minimum, maximum)


def __starting_point():
    main()
__starting_point()

n=int(input())
a=list(map(int,input().split()))
b=[]
c=[0]*8
d=0
for i in a:
    if i<3200:
        b.append(i)
    else:
        d+=1
for i in range(len(b)):
    for j in range(8):
        if 400*j<=b[i]<400*(j+1):
            c[j]=1
print(max(sum(c),1),sum(c)+d)

from collections import defaultdict
N = int(input())
a = list(map(int,input().split()))
d = defaultdict(int)
for x in a:
    d[min(x//400, 8)] += 1
mi = len(d.keys())
if d[8] > 0 and mi >= 2:
    mi -= 1
mx = d[8]+len([i for i in range(8) if i in d])
print(mi, mx)

N = int(input())
a = [ int(v) for v in input().split(" ") ]
 
l = [0] * 9
 
for i in range(N):
  rate = a[i]
  
  if rate < 400:
    l[0] += 1
  elif rate < 800:
    l[1] += 1
  elif rate < 1200:
    l[2] += 1
  elif rate < 1600:
    l[3] += 1
  elif rate < 2000:
    l[4] += 1
  elif rate < 2400:
    l[5] += 1
  elif rate < 2800:
    l[6] += 1
  elif rate < 3200:
    l[7] += 1
  else:
    l[8] += 1
 
uniq_n = 0
for i in range(8):
  if l[i] != 0:
    uniq_n += 1
 
min_v = 1 if uniq_n == 0 else uniq_n
max_v = uniq_n + l[8]
print(min_v, max_v)

n = int(input())

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

c = [0]*9
for i in a:
  t = i // 400
  if t < 8:
    c[t] = 1
  else:
    c[8] += 1
cmin = max(sum(c[:-1]), min(c[8], 1))
cmax = sum(c)
print(cmin, cmax)

#
# abc064 c
#
import sys
from io import StringIO
import unittest


class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)

    def test_入力例_1(self):
        input = """4
2100 2500 2700 2700"""
        output = """2 2"""
        self.assertIO(input, output)

    def test_入力例_2(self):
        input = """5
1100 1900 2800 3200 3200"""
        output = """3 5"""
        self.assertIO(input, output)

    def test_入力例_3(self):
        input = """20
800 810 820 830 840 850 860 870 880 890 900 910 920 930 940 950 960 970 980 990"""
        output = """1 1"""
        self.assertIO(input, output)


def resolve():
    N = int(input())
    A = list(map(int, input().split()))

    C = [0] * 9
    for a in A:
        for i in range(8):
            if 400*i <= a <= 400*i+399:
                C[i] = 1
                break
        else:
            C[8] += 1

    print(f"{max(1, C[:8].count(1))} {C[:8].count(1)+C[8]}")


def __starting_point():
    # unittest.main()
    resolve()

__starting_point()