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.
[{"code": "n = int(input())\na = list(map(int, input().split()))\n\nans = 0\nt = 400\nwhile t < 3201:\n  for i in a:\n    if i >= t-400 and i < t:\n      ans += 1\n      break\n  t += 400\n\ns = 0\nfor i in a:\n  if i >= 3200: s += 1\n\nif ans == 0: print(1, s)\nelse: print(ans, ans+s)", "passed": true, "time": 0.33, "memory": 14092.0, "status": "done"}, {"code": "n=int(input())\na=list(map(int,input().split()))\ncount=0\nans=1\ncolor_lis=[0,0,0,0,0,0,0,0]\nfor i in range(n):\n  if a[i]//400>=8:\n    count+=1\n  else:\n    color_lis[a[i]//400]=1\nans=sum(color_lis)\nif count>0:\n  flag=1\nelse:\n  flag=0\nans1 = max(flag,ans)\nans2 = ans+count\nprint(ans1,ans2)", "passed": true, "time": 0.14, "memory": 14068.0, "status": "done"}, {"code": "n=int(input())\na=list(map(int,input().split()))\n\ncolor=[]\nfree=0\nSans,Mans=0,0\nfor i in a:\n    if i//400<8 and i//400 not in color:\n        color.append(i//400)\n        Sans+=1\n    elif i>=3200:\n        free+=1\n        \n#Mans=Sans\n#if free+Sans>=8:\n #   Mans=8\n#else:\n #   Mans=Sans+free\n\nMans=Sans+free\nif Sans==0:\n    Sans=1\nprint(Sans,Mans)", "passed": true, "time": 0.14, "memory": 14040.0, "status": "done"}, {"code": "n = int(input())\na = list(map(int,input().split()))\nrate = [0,399,799,1199,1599,1999,2399,2799,3199,4800]\ncnt = [0]*9\n\nfor i in a:\n    for j in range(1,len(rate)+1):\n        if rate[j-1] < i <= rate[j]:\n            cnt[j-1] += 1\n\nfix = 0\nflex = 0\nfor i,result in enumerate(cnt):\n    if i == 8:\n        flex = cnt[i]\n    elif result > 0:\n        fix += 1\n\nif fix == 0 and flex >= 1:\n    print(1,flex)\nelse:\n    print(fix,fix+flex)", "passed": true, "time": 0.31, "memory": 14376.0, "status": "done"}, {"code": "N=int(input())\nList = list(map(int, input().split()))\nsumList = [0]*8\nmid = 0\nfor i in range(N):\n  if 1<=List[i]<=399:\n    sumList[0] += 1\n  elif 400<= List[i] <=799:\n    sumList[1] += 1\n  elif 800 <= List[i] <= 1199:\n    sumList[2] += 1\n  elif 1200<= List[i] <=1599:\n    sumList[3] += 1\n  elif 1600<= List[i] <=1999:\n    sumList[4] += 1\n  elif 2000 <= List[i] <= 2399:\n    sumList[5] += 1\n  elif 2400 <= List[i] <= 2799:\n    sumList[6] += 1\n  elif 2800 <= List[i] <= 3199:\n    sumList[7] += 1\n  elif 3200 <= List[i]:\n    mid += 1\nres1 = 8 - sumList.count(0)\nres2 = res1 + mid\nif res1 == 0 and mid > 0:\n  res1 = 1\nprint(res1,res2)", "passed": true, "time": 0.15, "memory": 14360.0, "status": "done"}, {"code": "n=int(input())\na=list(map(int,input().split()))\nl = [0]*9\ncnt = 0\nfor i in a:\n        if i <400:\n                l[0] +=1\n        elif i<800:\n                l[1] +=1\n        elif i < 1200:\n                l[2] +=1\n        elif i<1600:\n                l[3] +=1\n        elif i < 2000:\n                l[4] +=1\n        elif i<2400:\n                l[5] +=1\n        elif i < 2800:\n                l[6] +=1\n        elif i<3200:\n                l[7] +=1 \n        else:\n                l[8] +=1\nfor i in range(8):\n        if l[i] >=1:\n                cnt +=1\n\nif cnt == 0:\n        print(1,l[8])\nelse:\n        print(cnt,cnt+l[8])", "passed": true, "time": 0.14, "memory": 14100.0, "status": "done"}, {"code": "N = int(input())\na = list(map(int, input().split()))\n\ncolor = []\nrainbow = 0\n\nfor i in range(N):\n    if 1 <= a[i] <= 399:\n        color.append('gray')\n    elif 400 <= a[i] <= 799:\n        color.append('brown')\n    elif 800 <= a[i] <= 1199:\n        color.append('green')\n    elif 1200 <= a[i] <= 1599:\n        color.append('sky')\n    elif 1600 <= a[i] <= 1999:\n        color.append('blue')\n    elif 2000 <= a[i] <= 2399:\n        color.append('yellow')\n    elif 2400 <= a[i] <= 2799:\n        color.append('orange')\n    elif 2800 <= a[i] <= 3199:\n        color.append('red')\n    else:\n        rainbow += 1\n        color.append('all')\n\nif len(set(color)) == 1 and rainbow > 0:\n    mini = 1\nelif rainbow == 0:\n    mini = len(set(color))\nelse:\n    mini = max(1, len(set(color))-1)\n\nif rainbow > 1:\n    maxi = len(set(color)) + rainbow - 1\nelse:\n    maxi = len(set(color))\n\nprint(mini, maxi)", "passed": true, "time": 0.19, "memory": 14260.0, "status": "done"}, {"code": "N=int(input())\nList = list(map(int, input().split()))\nsumList = [0]*8\nmid = 0\nfor i in range(N):\n  if 1<=List[i]<=399:\n    sumList[0] += 1\n  elif 400<= List[i] <=799:\n    sumList[1] += 1\n  elif 800 <= List[i] <= 1199:\n    sumList[2] += 1\n  elif 1200<= List[i] <=1599:\n    sumList[3] += 1\n  elif 1600<= List[i] <=1999:\n    sumList[4] += 1\n  elif 2000 <= List[i] <= 2399:\n    sumList[5] += 1\n  elif 2400 <= List[i] <= 2799:\n    sumList[6] += 1\n  elif 2800 <= List[i] <= 3199:\n    sumList[7] += 1\n  elif 3200 <= List[i]:\n    mid += 1\nres1 = 8 - sumList.count(0)\nres2 = res1 + mid\nif res1 == 0 and mid > 0:\n  res1 = 1\nprint(res1,res2)", "passed": true, "time": 0.2, "memory": 14324.0, "status": "done"}, {"code": "n = int(input())\nrate = list(map(int, input().split()))\nv = [0] * 9\n\nfor i in range(n):\n  c = int(rate[i]/400)\n  if c >= 8:\n    v[8] += 1\n  else:\n    v[c] = 1\ns = sum(v[:8])\nmi = max(1, s)\nma = s+v[8]\n\nprint(mi, ma)", "passed": true, "time": 0.82, "memory": 14288.0, "status": "done"}, {"code": "N = int(input())\nR = list(map(int, input().split()))\nX = [0]*8\np = 0\nfor r in R:\n  if r >= 3200:\n    p += 1\n  else:\n    X[r//400] = 1\n\ns = sum(X)\nif s == 0:\n  print((str(1) + \" \" + str(p)))\nelse:\n  print((str(s) + \" \" + str(s + p)))\n", "passed": true, "time": 0.21, "memory": 14208.0, "status": "done"}, {"code": "N = int(input())\nA = list(map(int,input().split()))\nR = [0]*9\n\nfor a in A:\n  if a<400:\n    R[0]+=1\n  elif a<800:\n    R[1]+=1\n  elif a<1200:\n    R[2]+=1\n  elif a<1600:\n    R[3]+=1\n  elif a<2000:\n    R[4]+=1\n  elif a<2400:\n    R[5]+=1\n  elif a<2800:\n    R[6]+=1\n  elif a<3200:\n    R[7]+=1\n  else:\n    R[8]+=1\n\nif sum(R[:-1])!=0:\n  M = 8-R[:-1].count(0)+R[-1]\n  m = 8-R[:-1].count(0)\n  print(m,M)\nelse:\n  print(1,R[-1])", "passed": true, "time": 0.2, "memory": 14132.0, "status": "done"}, {"code": "#8 C - Colorful Leaderboard\nN = int(input())\na = list(map(int,input().split()))\n\nseen = [False]*8\ncnt = 0\ncnt_3200 = 0\nfor i in a:\n    i = i//400\n    if i >= 8:\n        cnt_3200 += 1\n    elif (seen[i] == False):\n        cnt += 1\n        seen[i] = True\n    \nif cnt == 0:\n    print(1,cnt_3200)\nelse:\n    print(cnt,cnt+cnt_3200)", "passed": true, "time": 0.22, "memory": 14236.0, "status": "done"}, {"code": "N=int(input())\nL=list(map(int,input().split()))\nL=[i//400 for i in L]\na=[i for i in L if i<8]\nb=[i for i in L if i>7]\na=len(set(a))\nb=len(b)\nif a==0:\n  mi=1\n  ma=b\nelse:\n  mi=a\n  ma=mi+b\nprint(mi,ma)", "passed": true, "time": 0.14, "memory": 14244.0, "status": "done"}, {"code": "a=int(input())\nb=list(map(int,input().split()))\nc=0\nd=0\ne=0\nf=0\ng=0\nh=0\ni=0\nj=0\nk=0\nx=0\nfor z in range(a):\n  if b[z]<=399:\n    c=c+1\n  if 400<=b[z]<799:\n    d=d+1\n  if 800<=b[z]<=1199:\n    e=e+1\n  if 1200<=b[z]<=1599:\n    f=f+1\n  if 1600<=b[z]<=1999:\n    g=g+1\n  if 2000<=b[z]<=2399:\n    h=h+1\n  if 2400<=b[z]<=2799:\n    i=i+1\n  if 2800<=b[z]<=3199:\n    j=j+1\n  if b[z]>=3200:\n    k=k+1\nif c!=0:\n  x=x+1\nif d!=0:\n  x=x+1\nif e!=0:\n  x=x+1\nif f!=0:\n  x=x+1\nif g!=0:\n  x=x+1\nif h!=0:\n  x=x+1\nif i!=0:\n  x=x+1\nif j!=0:\n  x=x+1\nif k+x>a:\n  print(x,a)\nelif (c+d+e+f+g+h+i+j)==0 and k!=0:\n  print(1,k)\nelse:\n  print(x,k+x)", "passed": true, "time": 0.29, "memory": 14204.0, "status": "done"}, {"code": "N = int(input())\nA = list(map(int, input().split()))\n\ncnt = [0]*8\nc = 0\nfor a in A:\n    if a <= 399:\n        cnt[0] += 1\n    elif a >= 400 and a <= 799:\n        cnt[1] += 1\n    elif a >= 800 and a <= 1199:\n        cnt[2] += 1\n    elif a >= 1200 and a <= 1599:\n        cnt[3] += 1\n    elif a >= 1600 and a <= 1999:\n        cnt[4] += 1\n    elif a >= 2000 and a <= 2399:\n        cnt[5] += 1\n    elif a >= 2400 and a <= 2799:\n        cnt[6] += 1\n    elif a >= 2800 and a <= 3199:\n        cnt[7] += 1\n    else:\n        c += 1\n        \nMin = len([i for i in cnt if i != 0])\nif c == 0:\n    print(Min, Min)\nelse:\n    Max = Min+c\n    if Min == 0:\n        print(1, Max)\n    else:\n        print(Min, Max)", "passed": true, "time": 0.14, "memory": 14140.0, "status": "done"}, {"code": "N=int(input())\na=list(map(int,input().split()))\nans=[0 for i in range(9)]\n\nfor i in range(N):\n    temp=a[i]//400\n    if temp>8:\n        ans[8]+=1\n    else:\n        ans[temp]+=1\nnin=0\nfor i in range(8):\n    if ans[i]!=0:\n        nin+=1\nif nin==0 and ans[8]!=0:\n    nin+=1\n    nax=ans[8]\nelse:\n    nax=nin+ans[8]\nprint(nin,nax)", "passed": true, "time": 0.15, "memory": 14328.0, "status": "done"}, {"code": "n=int(input())\na=list(map(int,input().split()))\na1=0\nb=0\nc=0\nd=0\ne=0\nf=0\ng=0\nh=0\nans=0\nfor i in range(n):\n  if 1<=a[i]<=399:\n    a1=1\n  elif 400<=a[i]<=799:\n    b=1\n  elif 800<=a[i]<=1199:\n    c=1\n  elif 1200<=a[i]<=1599:\n    d=1\n  elif 1600<=a[i]<=1999:\n    e=1\n  elif 2000<=a[i]<=2399:\n    f=1\n  elif 2400<=a[i]<=2799:\n    g=1\n  elif 2800<=a[i]<=3199:\n    h=1\n  else:\n    ans+=1\n\nx=a1+b+c+d+e+f+g+h\nif a1==b==c==d==e==f==g==h==0:\n  print(1,ans)\nelse:\n  print(x,x+ans)", "passed": true, "time": 0.21, "memory": 14172.0, "status": "done"}, {"code": "N = int(input())\na = list(map(int, input().split()))\n\ncolor = [0]*8\nfreer=0\n\nfor i in a:\n    if i<3200:\n        color[i//400]+=1\n    else:\n        freer+=1\n        \nans_base = 8-color.count(0)\n\nif ans_base==0:\n    ans_min = 1\nelse:\n    ans_min = ans_base\n    \nans_max = ans_base+freer\n        \nprint(ans_min, ans_max)", "passed": true, "time": 0.14, "memory": 14164.0, "status": "done"}, {"code": "N = int(input())\nlsa = list(map(int,input().split()))\nlsb = []\njoker = 0\nfor i in lsa:\n    if i >=1 and i <=399:\n        lsb.append('1')\n    elif i >=400 and i <=799:\n        lsb.append('2')\n    elif i >=800 and i <=1199:\n        lsb.append('3')\n    elif i >=1200 and i <=1599:\n        lsb.append('4')\n    elif i >=1600 and i <=1999:\n        lsb.append('5')\n    elif i >=2000 and i <=2399:\n        lsb.append('6')\n    elif i >=2400 and i <=2799:\n        lsb.append('7')\n    elif i >=2800 and i <=3199:\n        lsb.append('8')\n    elif i >=3200:\n        joker += 1\ns1 = len(set(lsb)) \ns2 = s1+joker\nprint(max(s1,1),s2)", "passed": true, "time": 0.22, "memory": 14392.0, "status": "done"}, {"code": "n = int(input())\nplayer = list(map(int, input().split()))\nresult = [0] * 8\nfree_color = 0\nfor i in range(n):\n    color = player[i] // 400\n    if color < 8:\n        result[color] = 1\n    else:\n        free_color += 1\nnum = 8 - result.count(0)\nprint((\"{} {}\".format(max(num, 1), num + free_color)))\n", "passed": true, "time": 0.16, "memory": 14284.0, "status": "done"}, {"code": "# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Tue Sep 22 04:19:50 2020\n\n@author: liang\n\"\"\"\n\nN = int(input())\nA = [int(x) for x in input().split()]\nd = [False]*8\ncount = 0\nans = 0\nfor a in A:\n    if a//400 >= 8:\n        count += 1\n    else:\n        if d[a//400] == False:\n            ans += 1\n            d[a//400] = True\n\nif count == 0:\n    print(ans,ans)\nelse:\n    if ans == 0:\n        print(1,count)\n    else:\n        print(ans,ans+count)", "passed": true, "time": 0.14, "memory": 14120.0, "status": "done"}, {"code": "n = int(input())\na = list(map(int, input().split())) \n\narr = [0] * 9\nans = [0] * 2\n\nfor i in a:\n    if i//400 < 8:\n        arr[i//400] = 1\n    else:\n        arr[8] += 1\n\nleft = sum(arr[:8])\nright = arr[8]\n\nans[0] = left\n\nif left == 0:\n    ans[0] = 1\n\nans[1] = left + right\n\nprint(*ans)", "passed": true, "time": 0.14, "memory": 14268.0, "status": "done"}, {"code": "n=int(input())\na=list(map(int,input().split()))\nb=[0]*8\nc=0\nfor x in a:\n  if x<400:\n    b[0]=1\n  elif x<800:\n    b[1]=1\n  elif x<1200:\n    b[2]=1\n  elif x<1600:\n    b[3]=1\n  elif x<2000:\n    b[4]=1\n  elif x<2400:\n    b[5]=1\n  elif x<2800:\n    b[6]=1\n  elif x<3200:\n    b[7]=1\n  else:\n    c+=1\nx=b.count(1)\nprint(max(x,1),x+c)", "passed": true, "time": 0.28, "memory": 14328.0, "status": "done"}, {"code": "n=int(input())\na=list(map(int,input().split()))\ncolor=[]\ncount,free=0,0\n\nfor i in range(n):\n    c=a[i]//400\n    if a[i]<3200 and c not in color:\n        color.append(c)\n        count+=1\n    elif a[i]>=3200:\n        free+=1\n      \nmin,max=0,0\nif count==0:\n    max=free\n    min=1\nelse:\n    max=count+free\n    min=count\n    \nprint(min,max)", "passed": true, "time": 0.14, "memory": 14296.0, "status": "done"}, {"code": "N = int(input())\nA = list(map(int,input().split()))\nL = []\nH = []\n\nfor i in range(N):\n  a = A[i]//400\n  if a > 7:\n    H.append(a)\n  else:\n    L.append(a)\n\nif len(L) != 0:\n  print(str(len(set(L)))+\" \"+str(len(set(L))+len(H)))\nelse:\n  print(\"1 \"+str(len(H)))", "passed": true, "time": 0.19, "memory": 14064.0, "status": "done"}, {"code": "N = int(input())\na = list(map(int, input().split()))\n\nc = [0] * 9\nfor i in range(N):\n    if a[i] >= 3200:\n        c[8] += 1\n    else:\n        for j in range(8):\n            if 400*j <= a[i] and a[i] <= 400 * (j + 1) -1:\n                c[j] = 1\n\nmin1 = max(1, sum(c[:8]))\nmax1 = sum(c)\n\nprint(min1, max1)", "passed": true, "time": 0.22, "memory": 14196.0, "status": "done"}, {"code": "#\u4e0a\u9650\u306a\u3044\u3093\u304b\u3044\n#0\u8272\u306f\u306a\u304b\u3063\u305f\n'''\nCreated on 2020/10/01\n\n@author: harurun\n'''\nimport sys\npin=sys.stdin.readline\n\ndef main():\n  N=int(pin())\n  a=list(map(int,pin().split()))\n  d=[0]*9\n  for i in a:\n    if i>=3200:\n      d[-1]+=1\n      continue\n    d[i//400]+=1\n  ans=0\n  for i in d[:-1]:\n    if i!=0:ans+=1\n  if ans==0:\n    print(f\"{1} {d[-1]}\")\n    return\n  print(f\"{ans} {ans+d[-1]}\")\n  return\nmain()\n", "passed": true, "time": 0.14, "memory": 14100.0, "status": "done"}, {"code": "n = int(input())\na = list(map(int, input().split()))\nrates = [0] * 8\ncnt = 0\n\nfor i in range(n):\n  if a[i] < 3200:\n    rates[a[i] // 400] += 1\n  else:\n    cnt += 1\n    \ncn = len(rates) - rates.count(0) #color number\nif sum(rates) == 0:\n  cmin = 1\nelse:\n  cmin = cn #color min\n\nif all([x < 3200 for x in a]):\n  cmax = cn #color max\nelse:\n  cmax = cn + cnt\n  \nprint(cmin,cmax)", "passed": true, "time": 0.14, "memory": 14244.0, "status": "done"}, {"code": "import math\n\nN = int(input())\nA = [math.floor(a/400) if a < 3200 else 3200 for a in list(map(int, input().split()))]\n\nset_A = set([a for a in A if a != 3200])\nprint(*[max(1, len(set_A)), len(set_A) + A.count(3200)], sep=\" \")", "passed": true, "time": 0.15, "memory": 14256.0, "status": "done"}, {"code": "from sys import stdin, stdout # only need for big input\n\ndef get_level(n):\n    return min( n // 400, 8)\n\ndef solve():\n    n = int(input()) \n    a = list(map(int, input().split()))\n    level_num = dict()\n    for i in range(9):\n        level_num[i] = 0\n    \n    for contestant in a:\n        lvl = get_level(contestant)\n        level_num[lvl] += 1\n\n    min_num = 0\n\n    for lvl in level_num:\n        if level_num[lvl] > 0 and lvl < 8:\n            min_num += 1\n    max_num = min_num + level_num[8]\n    if min_num < 1:\n        min_num = 1\n    # if max_num > 8:\n        # max_num = 8\n\n    print(min_num, max_num)\n        \n\n\n    \n\ndef main():\n    solve()\n\n\ndef __starting_point():\n    main()\n__starting_point()", "passed": true, "time": 0.15, "memory": 14336.0, "status": "done"}, {"code": "N = int(input())\nN_List = list(map(int,input().split()))\nNR_List = [i // 400 for i in N_List]\nNumber_NRD = len(set([i for i in NR_List if i < 8]))\nNumber_NRU = len([i for i in NR_List if i >= 8])\nmax_p= Number_NRD + Number_NRU\nmin_p= (Number_NRD,1)[Number_NRD == 0]\nprint(str(min_p) + \" \" + str(max_p))", "passed": true, "time": 0.15, "memory": 14332.0, "status": "done"}, {"code": "n = int(input())\na = sorted(map(int,input().split()))\n\nc = [0] * 9\nfor num in a:\n    if num < 400:\n        c[0] += 1\n    elif num < 800:\n        c[1] += 1\n    elif num < 1200:\n        c[2] += 1\n    elif num < 1600:\n        c[3] += 1\n    elif num < 2000:\n        c[4] += 1\n    elif num < 2400:\n        c[5] += 1\n    elif num < 2800:\n        c[6] += 1\n    elif num < 3200:\n        c[7] += 1\n    else:\n        c[8] += 1\nmi = 0\nma = 0\nfor i in range(8):\n    if c[i] >= 1:\n        mi += 1\n        ma += 1\nma += c[8]\nif mi == 0:\n    if c[8] >= 1:\n        mi += 1\nprint((str(mi) + \" \" + str(ma)))\n\n", "passed": true, "time": 0.15, "memory": 14120.0, "status": "done"}, {"code": "def cordtest(AAA):\n  jisyo ={'H':0,'C':0,'G':0,'M':0,'B':0,'Y':0,'O':0,'R':0,'A':0}\n  for i in AAA:\n    \n    if i <= 399:\n      jisyo['H'] +=1\n    elif 400 <= i <=799:\n      jisyo['C'] +=1\n    elif 800 <= i <=1199:\n      jisyo['G'] +=1\n    elif 1200 <= i <=1599:\n      jisyo['M'] +=1\n    elif 1600 <= i <=1999:\n      jisyo['B'] +=1\n    elif 2000 <= i <=2399:\n      jisyo['Y'] +=1\n    elif 2400 <= i <= 2799:\n      jisyo['O'] +=1\n    elif 2800 <= i <= 3199:\n      jisyo['R'] +=1\n    else:\n      jisyo['A'] +=1\n  maxi = 0\n  mini = 0\n  for i,j in jisyo.items():\n    \n    if i != 'A':\n      if j >0:\n        mini +=\t1\n    else:\n      maxi += j\n  ans = maxi + mini\n  if mini ==0:\n    mini =1\n  \n  return print(mini,ans)\nN = int(input())\nAA = list(map(int,input().split()))\ncordtest(AA)\n      \n      \n  ", "passed": true, "time": 0.15, "memory": 14152.0, "status": "done"}, {"code": "n=int(input())\na=list(map(int,input().split()))\n\nrate=[0]*9\nover=0\n\nfor i in a:\n  for j in range(1,9):\n    if 400*(j-1) <= i < 400*j:\n      rate[j]=1\n      break\n    elif i >= 3200:\n      over+=1\n      break\n\nansmin = rate.count(1)\nansmax = rate.count(1)\nif ansmin == 0:\n  ansmin=1\n\nif over > 0:\n  ansmax += over\n    \n#print(rate,over)\nprint(ansmin, ansmax)", "passed": true, "time": 0.24, "memory": 14160.0, "status": "done"}, {"code": "n = int(input())\nrates = map(int,input().split())\n\ncolors = set()\nover = 0\nfor rate in rates:\n    if 1<=rate and rate<=399:\n        colors.add(\"1-399\")\n    if 400<=rate and rate<=799:\n        colors.add(\"400-799\")\n    if 800<=rate and rate<=1199:\n        colors.add(\"800-1199\")\n    if 1200<=rate and rate<=1599:\n        colors.add(\"1200-1599\")\n    if 1600<=rate and rate<=1999:\n        colors.add(\"1600-1999\")\n    if 2000<=rate and rate<=2399:\n        colors.add(\"2000-2399\")\n    if 2400<=rate and rate<=2799:\n        colors.add(\"2400-2799\")\n    if 2800<=rate and rate<=3199:\n        colors.add(\"2800-3199\")\n    if 3200<=rate:\n        over+=1\n\nmin=len(colors)\nmax=min+over\n# if max>8:\n#     max=8\nif min==0:\n    min=1\nprint(min,max)", "passed": true, "time": 0.24, "memory": 14160.0, "status": "done"}, {"code": "N = int(input())\nA = list(map(int,input().split()))\n\ncolor = [0] * 9\n\nfor a in A:\n  if a <= 399:\n    color[0] = 1\n  elif a <= 799:\n    color[1] = 1\n  elif a <= 1199:\n    color[2] = 1\n  elif a <= 1599:\n    color[3] = 1\n  elif a <= 1999:\n    color[4] = 1\n  elif a <= 2399:\n    color[5] = 1\n  elif a <= 2799:\n    color[6] = 1\n  elif a <= 3199:\n    color[7] = 1\n  else:\n    color[8] += 1\n    \nmax_num = sum(color)\nmin_num = max(1, sum(color[:-1]))\n \nprint(min_num, max_num)", "passed": true, "time": 0.16, "memory": 14088.0, "status": "done"}, {"code": "N = int(input())\na = list(map(int, input().split()))\n\nrate = set()\nover = 0\nfor ai in a:\n    if ai >= 3200:\n        over += 1\n    else:\n        rate.add(ai // 400)\n\nL = len(rate)\nprint(max(1, L), L + over)", "passed": true, "time": 0.15, "memory": 14104.0, "status": "done"}, {"code": "N = int(input())\nrate = list(map(int,input().split()))\ncnt = 0\nans = []\nfor i in range(N):\n    if rate[i] >= 3200:\n        cnt += 1\n    else:\n        ans.append(rate[i]//400)\ns_ans = set(ans)\nprint(max(len(s_ans),1),len(s_ans)+cnt)", "passed": true, "time": 0.15, "memory": 14268.0, "status": "done"}, {"code": "n = int(input())\na = list(map(int, input().split()))\n\nupper = [399, 799, 1199, 1599, 1999, 2399, 2799,3199, 4800]\nlower = [1, 400, 800, 1200, 1600, 2000, 2400, 2800, 3200]\n\ncnt = 0\ntops = 0\nfor color in range(9)[::-1]:\n    for i in range(n):\n        if color == 8:\n            if lower[color] <= a[i] <= upper[color]:\n                tops += 1\n        else:\n            if lower[color] <= a[i] <= upper[color]:\n                cnt += 1\n                break\n\nprint(max(1, cnt), cnt + tops)", "passed": true, "time": 0.16, "memory": 14260.0, "status": "done"}, {"code": "N = int(input())\na = list(map(int, input().split()))\n\ncolor = [0] * 9\nfor i in range(N):\n    if 1<=a[i]<=399: color[0]+=1\n    elif 400<=a[i]<=799: color[1]+=1\n    elif 800<=a[i]<=1199: color[2]+=1\n    elif 1200<=a[i]<=1599: color[3]+=1\n    elif 1600<=a[i]<=1999: color[4]+=1\n    elif 2000<=a[i]<=2399: color[5]+=1\n    elif 2400<=a[i]<=2799: color[6]+=1\n    elif 2800<=a[i]<=3199: color[7]+=1\n    elif 3200<= a[i]: color[8] += 1\n\ncount = 0\nfor i in range(8):\n    if color[i] != 0:\n        count += 1\nif count == 0:\n    print(1, count+color[8])\nelse:\n    print(count, count+color[8])", "passed": true, "time": 0.14, "memory": 14104.0, "status": "done"}, {"code": "#C - Colorful Leaderboard \nN = int(input())\na = list(map(int,input().split()))\n\nmini = 0\ncolor_list = []\nfor i in a:\n    if (i//400)<8 and ((i//400 in color_list) == False):\n        mini += 1\n        color_list.append(i//400)\n\nmaxi = mini\nfor j in a:\n    if j >= 3200:\n        maxi += 1\nif mini == 0:#\u5fd8\u308c\u3066\u305f\n    mini = 1\nprint(mini,maxi)", "passed": true, "time": 0.22, "memory": 14300.0, "status": "done"}, {"code": "n = int(input())\na = list(map(int,input().split()))\ncolors = [\"\u7070\u8272\",\"\u8336\u8272\",\"\u7dd1\u8272\",\"\u6c34\u8272\",\"\u9752\u8272\",\"\u9ec4\u8272\",\"\u6a59\u8272\",\"\u8d64\u8272\",\"\u305d\u306e\u4ed6\"]\ndic = {}\nfor i in colors:\n  dic[i] = 0\nfor i in a:\n  if i < 400:\n    dic[\"\u7070\u8272\"] += 1\n  elif i < 800:\n    dic[\"\u8336\u8272\"] += 1\n  elif i < 1200:\n    dic[\"\u7dd1\u8272\"] += 1\n  elif i < 1600:\n    dic[\"\u6c34\u8272\"] += 1\n  elif i < 2000:\n    dic[\"\u9752\u8272\"] += 1\n  elif i < 2400:\n    dic[\"\u9ec4\u8272\"] += 1\n  elif i < 2800:\n    dic[\"\u6a59\u8272\"] += 1\n  elif i < 3200:\n    dic[\"\u8d64\u8272\"] += 1\n  else:\n    dic[\"\u305d\u306e\u4ed6\"] += 1\n\nans1 = 0\nans2 = 0\n\nfor i in colors:\n  if i == \"\u305d\u306e\u4ed6\":\n    if ans1 == 0:\n      ans1 = 1\n      ans2 = dic[i]\n      break\n    ans2 += dic[i]\n    continue\n  if dic[i] >= 1:\n      ans1 += 1\n      ans2 += 1\nprint(ans1,ans2)", "passed": true, "time": 0.15, "memory": 14220.0, "status": "done"}, {"code": "n = input()\na = list(map(int,input().split()))\n\ns = set()\nb = 0\nfor i in a:\n    if i < 3200:\n        s.add(i//400)\n    else:\n        b += 1\nelse:\n    min = len(s)\n    print(max(min, 1), min + b)", "passed": true, "time": 0.15, "memory": 14080.0, "status": "done"}, {"code": "n = int(input())\na = list(map(int, input().split()))\n\nrate = [0] * 8\ns = 0\n\nfor i in a:\n    if i < 400:\n        rate[0] = 1\n    elif 400 <= i < 800:\n        rate[1] = 1\n    elif 800 <= i < 1200:\n        rate[2] = 1\n    elif 1200 <= i < 1600:\n        rate[3] = 1\n    elif 1600 <= i < 2000:\n        rate[4] = 1\n    elif 2000 <= i < 2400:\n        rate[5] = 1\n    elif 2400 <= i < 2800: \n        rate[6] = 1\n    elif 2800 <= i < 3200:\n        rate[7] = 1\n    elif 3200 <= i:\n        s += 1\n\n\n\n    \nans1 = 8-rate.count(0)\nans2 = ans1+s\nif ans1 == 0 and s != 0:\n    ans1 = 1\n\n\nprint(ans1, ans2)", "passed": true, "time": 0.14, "memory": 14220.0, "status": "done"}, {"code": "n = int(input())\narr = list(map(int, input().split()))\n\ncolors = [0] * 8\nover = 0\n\nfor i in arr:\n    if i >= 3200:\n        over += 1\n    else:\n        colors[i // 400] += 1\n\nres = 8 - colors.count(0)\nif res:\n    print(res, res+over)\nelse:\n    print(1, over)", "passed": true, "time": 0.14, "memory": 14080.0, "status": "done"}, {"code": "n = int(input())\na = list(map(int,input().split()))\n\ncnt = [0] * 9\nfor i in a:\n    x = min(i // 400, 8)\n    if x >= 8:\n        cnt[8] += 1\n    else:\n        cnt[x] = 1\n\nif sum(cnt[:8]) == 0:\n    l = 1\n    r = cnt[8]\nelse:\n    l = sum(cnt[:8])\n    r = l+cnt[8]\nprint(l, r)", "passed": true, "time": 0.18, "memory": 14064.0, "status": "done"}, {"code": "n = int(input())\na = list(map(int, input().split()))\n\np = set()\nq = 0\nfor i in range(n):\n  if a[i] < 3200:\n    p.add(a[i]//400)\n  else:\n    q += 1\n\np = len(p)\nprint(max(p, 1), p+q)", "passed": true, "time": 0.2, "memory": 14320.0, "status": "done"}, {"code": "n=int(input())\na=list(map(int,input().split()))\ndata=[0]*9\nfor i in a:\n  if 1<=i<=399:\n    data[0]+=1\n  elif 400<=i<=799:\n    data[1]+=1\n  elif 800<=i<=1199:\n    data[2]+=1\n  elif 1200<=i<=1599:\n    data[3]+=1\n  elif 1600<=i<=1999:\n    data[4]+=1\n  elif 2000<=i<=2399:\n    data[5]+=1\n  elif 2400<=i<=2799:\n    data[6]+=1\n  elif 2800<=i<=3199:\n    data[7]+=1\n  elif 3200<=i:\n    data[8]+=1\nmin=0\nfor i in range(8):\n  if data[i]!=0:\n    min+=1\nif min!=0:\n  print(min,min+data[8])\nelse:\n  print(1,data[8])", "passed": true, "time": 0.14, "memory": 14156.0, "status": "done"}, {"code": "N = int(input())\nA = list(map(int, input().split()))\nrate = {\"a\":0, \"b\":0, \"c\":0, \"d\":0, \"e\":0, \"f\":0, \"g\":0, \"h\":0}\nratez = {\"z\":0}\nfor i in range(N):\n    if A[i] >=1 and A[i] <= 399:\n        rate[\"a\"] += 1\n    if A[i] >=400 and A[i] <= 799:\n        rate[\"b\"] += 1\n    if A[i] >=800 and A[i] <= 1199:\n        rate[\"c\"] += 1\n    if A[i] >=1200 and A[i] <= 1599:\n        rate[\"d\"] += 1\n    if A[i] >=1600 and A[i] <= 1999:\n        rate[\"e\"] += 1\n    if A[i] >=2000 and A[i] <= 2399:\n        rate[\"f\"] += 1\n    if A[i] >=2400 and A[i] <= 2799:\n        rate[\"g\"] += 1\n    if A[i] >=2800 and A[i] <= 3199:\n        rate[\"h\"] += 1\n    if A[i] >=3200:\n        ratez[\"z\"] += 1\nkeys = [k for k, v in rate.items() if v != 0]\n\nif ratez[\"z\"] == 0:\n    print(len(keys), len(keys))\nelif len(keys) == 0:\n    print(1, ratez[\"z\"])\nelse:\n    print(len(keys), len(keys)+ratez[\"z\"])", "passed": true, "time": 0.14, "memory": 14236.0, "status": "done"}, {"code": "n = int(input())\nA = list(map(int, input().split()))\n\nrate = [0 for _ in range(9)]\n\nfor a in A:\n    if a < 400:\n        rate[0] += 1\n    elif a < 800:\n        rate[1] += 1\n    elif a < 1200:\n        rate[2] += 1\n    elif a < 1600:\n        rate[3] += 1\n    elif a < 2000:\n        rate[4] += 1\n    elif a < 2400:\n        rate[5] += 1\n    elif a < 2800:\n        rate[6] += 1\n    elif a < 3200:\n        rate[7] += 1\n    else:\n        rate[8] += 1\n\nans = 0\nfor i in range(8):\n    if rate[i] >= 1:\n        ans += 1\nif ans == 0:\n    print(1, rate[8])\nelse:\n    print(ans, ans + rate[8])", "passed": true, "time": 0.14, "memory": 14164.0, "status": "done"}, {"code": "n=int(input())\na=list(map(int,input().split()))\nb=[0]*9\nfor i in range(n):\n  if a[i]<400:\n    b[0]+=1\n  elif a[i]<800:\n    b[1]+=1\n  elif a[i]<1200:\n    b[2]+=1\n  elif a[i]<1600:\n    b[3]+=1\n  elif a[i]<2000:\n    b[4]+=1\n  elif a[i]<2400:\n    b[5]+=1\n  elif a[i]<2800:\n    b[6]+=1\n  elif a[i]<3200:\n    b[7]+=1\n  else:\n    b[8]+=1\n    \nmin=8-b[:8].count(0)\nmax=min+b[8]\n\nif min==0:\n  min=1\nprint(min,max)", "passed": true, "time": 0.15, "memory": 14104.0, "status": "done"}, {"code": "N = int(input())\nA = list(map(int, input().split()))\nB = [i // 400 for i in A if i < 3200]\nif B == []:\n  print(1, N)\nelif len(B) == N:\n  C = len(set(B))\n  print(C, C)\nelse:\n  C = len(set(B))\n  D = C + N - len(B)\n  print(C, D)", "passed": true, "time": 0.14, "memory": 14296.0, "status": "done"}, {"code": "N = int(input())\nrate = [1, 400, 800, 1200, 1600, 2000, 2400, 2800, 3200]\np = [0] * 9\n\nA = [int(a) for a in input().split(\" \")]\nA.sort()\n\nj = 0\nfor i in range(len(A)):\n  while j < 8:\n    if rate[j] <= A[i] < rate[j + 1]:\n      p[j] = 1\n      break\n    else:\n      j += 1\n  else:\n    p[8] = len(A[i:])\n    break\n\nprint((str(max([sum(p[:8]), 1])) + \" \" + str(sum(p))))\n", "passed": true, "time": 0.14, "memory": 14336.0, "status": "done"}, {"code": "n = int(input())\na = list(map(int,input().split()))\n\ncnt = [0] * 9\nfor i in a:\n    x = min(i // 400, 8)\n    if x >= 8:\n        cnt[8] += 1\n    else:\n        cnt[x] = 1\n\nif sum(cnt[:8]) == 0:\n    l = 1\n    r = cnt[8]\nelse:\n    l = sum(cnt[:8])\n    r = l+cnt[8]\nprint(l, r)", "passed": true, "time": 0.14, "memory": 14096.0, "status": "done"}, {"code": "def color(n):\n    if n < 400:\n        return '\u7070'\n    elif n < 800:\n        return '\u8336'\n    elif n < 1200:\n        return '\u7dd1'\n    elif n < 1600:\n        return '\u6c34'\n    elif n < 2000:\n        return '\u9752'\n    elif n < 2400:\n        return '\u9ec4'\n    elif n < 2800:\n        return '\u6a59'\n    elif n < 3200:\n        return '\u8d64'\n    else:\n        return None\n\n\nN = int(input())\na = list(map(int, input().split()))\n\ncolors = set()\nover = 0\n\nfor c in a:\n    if color(c):\n        colors.add(color(c))\n    else:\n        over += 1\n\nprint(max(1, len(colors)), end=' ')\nprint(len(colors)+over)", "passed": true, "time": 0.14, "memory": 14160.0, "status": "done"}, {"code": "n=int(input())\nl=list(map(int,input().split()))\n\nans=[0 for i in range(8)]\nrate_3200=0\n\nfor i in l:\n  if 1<=i<=399:\n    ans[0]+=1\n  elif 400<=i<=799:\n    ans[1]+=1\n  elif 800<=i<=1199:\n    ans[2]+=1\n  elif 1200<=i<=1599:\n    ans[3]+=1\n  elif 1600<=i<=1999:\n    ans[4]+=1\n  elif 2000<=i<=2399:\n    ans[5]+=1\n  elif 2400<=i<=2799:\n    ans[6]+=1\n  elif 2800<=i<=3199:\n    ans[7]+=1\n  elif 3200<=i:\n    rate_3200+=1\n    \nif rate_3200==0:\n  num=8-ans.count(0)\n  print((\"{} {}\".format(num,num)))\nelse:\n  count_0=ans.count(0)\n  if count_0==8:\n    min_num=1\n    max_num=rate_3200\n  else:\n    min_num=8-count_0\n    max_num=8-count_0+rate_3200\n  print((\"{} {}\".format(min_num,max_num)))\n", "passed": true, "time": 0.14, "memory": 14200.0, "status": "done"}, {"code": "N = int(input())\na = list(map(int, input().split()))\ncolor = set()\nrainbow = 0\n\nfor n in range(N):\n  if 1 <= a[n] < 400:\n    color.add(\"gray\")\n  elif 400 <= a[n] < 800:\n    color.add(\"brown\")\n  elif 800 <= a[n] < 1200:\n    color.add(\"green\")\n  elif 1200<= a[n] < 1600:\n    color.add(\"water\")\n  elif 1600 <= a[n] < 2000:\n    color.add(\"blue\")\n  elif 2000 <= a[n] < 2400:\n    color.add('yellow')\n  elif 2400 <= a[n] < 2800:\n    color.add('orange')\n  elif 2800 <= a[n] < 3200:\n    color.add('red')\n  else:\n    rainbow += 1\n\nif len(color) == 0:\n\tcolor_min = 1 \n\tcolor_max = rainbow\nelse:\n  color_min = len(color)\n  color_max = color_min + rainbow\n\n    \nprint(f'{color_min} {color_max}')\n", "passed": true, "time": 0.14, "memory": 14092.0, "status": "done"}, {"code": "n = int(input())\nal = list(map(int, input().split()))\nratel = [0,0,0,0,0,0,0,0,0]\n\ndef check(a):\n    if 1 <= a <= 399:\n        return 0\n    elif 400 <= a <= 799:\n        return 1\n    elif 800 <= a <= 1199:\n        return 2\n    elif 1200 <= a <= 1599:\n        return 3\n    elif 1600 <= a <= 1999:\n        return 4\n    elif 2000 <= a <= 2399:\n        return 5\n    elif 2400 <= a <= 2799:\n        return 6\n    elif 2800 <= a <= 3199:\n        return 7\n    else:\n        return 8\n\nfor a in al:\n    i = check(a)\n    ratel[i] += 1\n\n\nzeroc = 0\nratec = 0\nfor i in range(8):\n    if ratel[i] == 0:\n        zeroc += 1\n    else:\n        ratec += 1\n\nif ratel[8] == 0:\n    print(ratec,ratec)\nelif 1 <= ratel[8] <= 8:\n    if ratec == 0:\n        print(1,ratel[8])\n    elif ratel[8] < zeroc:\n        print(ratec, ratec+ratel[8])\n    elif ratel[8] >= zeroc:\n        print(ratec,ratec+ratel[8])\nelse:\n    if ratec == 0:\n        print(1,ratel[8])\n    else:\n        print(ratec,ratec+ratel[8])", "passed": true, "time": 0.3, "memory": 14384.0, "status": "done"}, {"code": "n = int(input())\na = list(map(int,input().split()))\ncnt = [0]*8\nfree = 0\nfor i in range(n):\n    if a[i] <= 3199:\n        cnt[a[i]//400] += 1\n    else:\n        free += 1\nprint(max(1,8-cnt.count(0)),8-cnt.count(0)+free)", "passed": true, "time": 0.14, "memory": 14240.0, "status": "done"}, {"code": "N = int(input())\nA = list(map(int, input().split()))\ncin = [0, 0, 0, 0, 0, 0, 0, 0]\nkin = 0\npin = 0\nflag = 0\nfor i in A:\n    if i < 3200:\n        cin[i//400] += 1\n        pin = 1\n    else:\n        kin += 1\n        flag = 1\nif pin == 0:\n    print(1, kin)\nelse:\n    print(8-cin.count(0), 8-cin.count(0)+kin)", "passed": true, "time": 0.14, "memory": 14248.0, "status": "done"}, {"code": "N=int(input())\na=list(map(int,input().strip().split()))\n\nc=[0 for n in range(8)]\nf=0\nfor n in range(N):\n    tmp=a[n]//400\n    if tmp>=8:\n        f+=1\n    else:\n        if c[tmp]==0:\n            c[tmp]+=1\nMIN=max(sum(c),1)\nMAX=sum(c)+f\nprint((str(MIN)+\" \"+str(MAX)))\n", "passed": true, "time": 0.14, "memory": 14072.0, "status": "done"}, {"code": "def index(rate):\n    if rate <= 3199:\n        idx = rate // 400\n    else:\n        idx = 'free'\n    return idx\n\n\ndef main():\n    n = int(input())\n    a_lst = list(map(int, input().split()))\n    color_lst = [0] * 8\n\n    free = 0\n    for i in range(n):\n        rate = a_lst[i]\n        idx = index(rate)\n        if idx == 'free':\n            free += 1\n        else:\n            color_lst[idx] = 1\n\n    types = 0\n    for i in range(8):\n        if color_lst[i] == 1:\n            types += 1\n\n    if types > 0:\n        minimum = types\n    else:\n        minimum = 1\n\n    maximum = types\n    max_add = free\n    maximum += max_add\n\n    print(minimum, maximum)\n\n\ndef __starting_point():\n    main()\n__starting_point()", "passed": true, "time": 0.14, "memory": 14280.0, "status": "done"}, {"code": "n=int(input())\na=list(map(int,input().split()))\nb=[]\nc=[0]*8\nd=0\nfor i in a:\n    if i<3200:\n        b.append(i)\n    else:\n        d+=1\nfor i in range(len(b)):\n    for j in range(8):\n        if 400*j<=b[i]<400*(j+1):\n            c[j]=1\nprint(max(sum(c),1),sum(c)+d)", "passed": true, "time": 0.14, "memory": 14252.0, "status": "done"}, {"code": "from collections import defaultdict\nN = int(input())\na = list(map(int,input().split()))\nd = defaultdict(int)\nfor x in a:\n    d[min(x//400, 8)] += 1\nmi = len(d.keys())\nif d[8] > 0 and mi >= 2:\n    mi -= 1\nmx = d[8]+len([i for i in range(8) if i in d])\nprint(mi, mx)", "passed": true, "time": 0.21, "memory": 14156.0, "status": "done"}, {"code": "N = int(input())\na = [ int(v) for v in input().split(\" \") ]\n \nl = [0] * 9\n \nfor i in range(N):\n  rate = a[i]\n  \n  if rate < 400:\n    l[0] += 1\n  elif rate < 800:\n    l[1] += 1\n  elif rate < 1200:\n    l[2] += 1\n  elif rate < 1600:\n    l[3] += 1\n  elif rate < 2000:\n    l[4] += 1\n  elif rate < 2400:\n    l[5] += 1\n  elif rate < 2800:\n    l[6] += 1\n  elif rate < 3200:\n    l[7] += 1\n  else:\n    l[8] += 1\n \nuniq_n = 0\nfor i in range(8):\n  if l[i] != 0:\n    uniq_n += 1\n \nmin_v = 1 if uniq_n == 0 else uniq_n\nmax_v = uniq_n + l[8]\nprint(min_v, max_v)", "passed": true, "time": 0.14, "memory": 14296.0, "status": "done"}, {"code": "n = int(input())\n\na = list(map(int, input().split()))\n\nc = [0]*9\nfor i in a:\n  t = i // 400\n  if t < 8:\n    c[t] = 1\n  else:\n    c[8] += 1\ncmin = max(sum(c[:-1]), min(c[8], 1))\ncmax = sum(c)\nprint(cmin, cmax)", "passed": true, "time": 0.14, "memory": 14196.0, "status": "done"}, {"code": "#\n# abc064 c\n#\nimport sys\nfrom io import StringIO\nimport unittest\n\n\nclass TestClass(unittest.TestCase):\n    def assertIO(self, input, output):\n        stdout, stdin = sys.stdout, sys.stdin\n        sys.stdout, sys.stdin = StringIO(), StringIO(input)\n        resolve()\n        sys.stdout.seek(0)\n        out = sys.stdout.read()[:-1]\n        sys.stdout, sys.stdin = stdout, stdin\n        self.assertEqual(out, output)\n\n    def test_\u5165\u529b\u4f8b_1(self):\n        input = \"\"\"4\n2100 2500 2700 2700\"\"\"\n        output = \"\"\"2 2\"\"\"\n        self.assertIO(input, output)\n\n    def test_\u5165\u529b\u4f8b_2(self):\n        input = \"\"\"5\n1100 1900 2800 3200 3200\"\"\"\n        output = \"\"\"3 5\"\"\"\n        self.assertIO(input, output)\n\n    def test_\u5165\u529b\u4f8b_3(self):\n        input = \"\"\"20\n800 810 820 830 840 850 860 870 880 890 900 910 920 930 940 950 960 970 980 990\"\"\"\n        output = \"\"\"1 1\"\"\"\n        self.assertIO(input, output)\n\n\ndef resolve():\n    N = int(input())\n    A = list(map(int, input().split()))\n\n    C = [0] * 9\n    for a in A:\n        for i in range(8):\n            if 400*i <= a <= 400*i+399:\n                C[i] = 1\n                break\n        else:\n            C[8] += 1\n\n    print(f\"{max(1, C[:8].count(1))} {C[:8].count(1)+C[8]}\")\n\n\ndef __starting_point():\n    # unittest.main()\n    resolve()\n\n__starting_point()", "passed": true, "time": 0.14, "memory": 14584.0, "status": "done"}]