Harryxun/stf_run huggingface dataset:
def main1():
    N=int(input())
    A=list(map(int,input().split()))
    A.sort()
    ans=[1]*len(A)
    for i in  range(len(A)-1):
        if ans[i]==0:
            continue
        for j in range(i+1,len(A)):
            if A[j]%A[i]==0:
                ans[j]=0
    an=0
    for i in range(len(A)-1):
        if A[i]!=A[i+1]:
            an+=ans[i]
    an+=ans[-1]
    print(an)
main1()


### FIXED CODE ###

A=list(map(int,input().split()))
for i in range(len(A)):
  if A[i]==0:
    print(i+1)
    break
n = int(input())
A = []
for i in range(n):
  a = int(input())
  A.append(a)
m = max(A)
m2 = sorted(set(A))[-2]
c = A.count(m)

bool = False
if c == 1:
  bool = True

for i in A:
  if bool and i==m:
    print(m2)
  else:
    print(m)

### FIXED CODE ###

n = int(input())
A = []
for i in range(n):
  a = int(input())
  A.append(a)
m = max(A)
c = A.count(m)

if len(set(A)) > 1:
	m2 = sorted(set(A))[-2]

bool = False
if c == 1:
  bool = True

for i in A:
  if bool and i==m:
    print(m2)
  else:
    print(m)
count = 0
N,M,X,Y = list(map(int,input().split(' ')))
XL = list(map(int,input().split(' ')))
YL = list(map(int,input().split(' ')))

XL.sort()
YL.sort()

for z range(X+1,Y+1):
	if z>XL[N-1] and z<=YL[0]:
		count = 1 

if count>0:
	print('No war')
else:
	print('war')

### FIXED CODE ###

count = 0
N,M,X,Y = list(map(int,input().split(' ')))
XL = list(map(int,input().split(' ')))
YL = list(map(int,input().split(' ')))
 
for z in range(X+1,Y+1):
  if z>max(X,max(XL)) and z<=min(Y,min(YL)):
    count += 1 

if count>0:
  print('No War')
else:
  print('War')
N = int(input())
A = list(map(int, input().split()))
color = [0] * 3 # 赤色・青色・緑色の帽子を被っている人数
answer = 1 
MOD = 10 ** 9 + 7

for a in A:
    answer *= color.count(a)
    # aと同じ人数が複数ある場合は一番左の色としてカウント
    i = color.index(a)
    color[i] += 1
    answer %= MOD

print(answer)

### FIXED CODE ###

import sys
sys.setrecursionlimit(10 ** 7)

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

color = [0] * 3 # 赤色・青色・緑色の帽子を被っている人数
answer = 1 
MOD = 10 ** 9 + 7

for a in A:
    if color.count(a) == 0:
        print(0)
        exit()
    answer *= color.count(a)
    # aと同じ人数が複数ある場合は一番左の色としてカウント
    i = color.index(a)
    color[i] += 1
    answer %= MOD

print(answer)
a,b,c=map(int,input().split())
if("Yes" if a+b>=c else "No")

### FIXED CODE ###

a,b,c=map(int,input().split())
print("Yes" if a+b>=c else "No")
import math
A, B, N = map(int, input().split())

for i in range(N+1):
    num = math.floor(A*i/B) - A*math.floor(i/B)
    if num > maxnum:
        maxnum = num
    print(str(i) + ':' + str(num) + ' max is ' + str(maxnum))
print(maxnum)


### FIXED CODE ###

import math
A, B, N = map(int, input().split())

num = math.floor(A*min(B-1,N)/B) - A*math.floor(min(B-1,N)/B)

print(num)
numpy as np

INPUT_1 = input()

N = int(INPUT_1.split(" ")[0])
M = int(INPUT_1.split(" ")[1])

A = np.empty(N)
B = np.empty(N)

for i in range(N):
    INPUT_AB = input()
    A[i] = int(INPUT_AB.split(" ")[0])
    B[i] = int(INPUT_AB.split(" ")[1])

num_drink = 0
drink_price = 0

while num_drink < M:
    price = np.amin(A)
    store_index = np.argmin(A)
    num_drink += B[store_index]
    print(num_drink)
    if num_drink >= M:
        num_drink -= B[store_index]
        while num_drink < M:
            num_drink += 1
            drink_price += price
        
    else:
        drink_price += price * B[store_index]
        A = np.delete(A, store_index)
        B = np.delete(B, store_index)

print(drink_price)

### FIXED CODE ###

# 2150 start

import numpy

N,M=map(int, input().split())
price = numpy.empty((N,3))
sumcan = 0
sumprice = 0
lastshop = 0

for i in range(N):
    shop_data = input().split()
    A = int(shop_data[0])
    B = int(shop_data[1])
    price[i,0]= A * B
    price[i,1] = A
    price[i,2] = B

price = price[price[:,1].argsort(),:]

for j in range(M):
    sumcan = sumcan + price[j,2]
    if sumcan < M:
        sumprice = sumprice + price[j,0]
    elif sumcan >= M:
        sumcan = sumcan - price[j,2]
        lastshop = j
        break

sumprice = sumprice + (M - sumcan)*price[lastshop,1]

print(int(sumprice))
a = int(input())
b = str(input())

if (a/2)%2==1:
  print('No')
elif:
  if b[0:int(a/2)]==b[int(a/2):]:
    print('Yes')
  else:
    print('No')

### FIXED CODE ###

a = int(input())
b = str(input())
 
if (a%2)==1:
  print('No')
elif b[0:int(a/2)]==b[int(a/2):]:
    print('Yes')
else:
  print('No')
s = [char(i) for i in range(97,97+26)]
print(s)

### FIXED CODE ###

alpha_set = set([chr(i) for i in range(97,97+26)])
s = set(input())
diff = list(alpha_set-s)
if len(diff)==0:
  print("None")
else:
  diff.sort()
  print(diff[0])
s = input()
t = input()
S = ''.join(reverse(list(s)))
T = ''.join(reverse(list(t)))
print("Yes" if S < T else "No")


### FIXED CODE ###

s = input()
t = input()
S = ''.join(list(sorted(s)))
T = ''.join(list(sorted(t,reverse = True)))
print("Yes" if S < T else "No")
def solve():
    while 1:
        N = int(input())
        D = list(map(int, input(" ")))
        M = int(input())
        T = list(map(int, input(" ")))

        for t in T:
            if t not in D:
                print("NO")
                break

        print("YES")
        break


solve()

### FIXED CODE ###

def solve():
    while 1:
        try:
            N = int(input())
            D = list(map(int, input().split(" ")))
            M = int(input())
            T = list(map(int, input().split(" ")))
            D_dict = {}
            T_dict = {}
            for d in D:
                if d not in D_dict:
                    D_dict[d] = 1
                else:
                    D_dict[d] += 1

            for t in T:
                if t not in T_dict:
                    T_dict[t] = 1
                else:
                    T_dict[t] += 1

            for key, val in T_dict.items():
                if key not in D_dict:
                    print("NO")
                    raise EndLoop
                else:
                    if val > D_dict[key]:
                        print("NO")
                        raise EndLoop

            print("YES")
            break
        except:
            break


solve()
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

n = INT()
a = LIST()

tmp1 = []
tmp2 = []

for i, a in enumerate(a):
    if i%2 == 0:
        tmp1.append(a)
    else:
        tmp2.append(a)
if n%2 == 0:
    print(*tmp2[::-1], *tmp1)
else:
    print(*tmp1[::-1], *tmp2)


### FIXED CODE ###

import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

n = INT()
a = LIST()

tmp1 = []
tmp2 = []

for i, a in enumerate(a):
    if i%2 == 0:
        tmp1.append(a)
    else:
        tmp2.append(a)
if n%2 == 0:
    print(*(tmp2[::-1]+tmp1))
else:
    print(*(tmp1[::-1]+tmp2))
num = 1

While = True:
    x = int(input())
    if x == 0: break
    print ("Case {0}: {1}".format(num,x))
    num += 1


### FIXED CODE ###


num = 1

while True:
    x = int(input())
    if x == 0: break
    print ("Case {0}: {1}".format(num,x))
    num += 1
n = int(input())
nums = [int(input()) for _ in range(n)]

bool = True
for i in range(n):
    t = nums[i] - 1
    if t > nums[i+1]:
        bool = False

if bool:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

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

for i in range(1, n, 1):
    if nums[i] < nums[i - 1]:
        print("No")
        exit()

    if nums[i] > nums[i - 1]:
        nums[i] -= 1

print("Yes")
from queue import Queue
from collections import defaultdict

count = defaultdict(int)
tree = defaultdict(lambda: [])

n, q = map(int, input().split())
for _ in range(_q):
    p, x = map(int, input().split())
    count[p] += x
for _ in range(_n - 1):
    a, b = map(int, input().split())
    tree[a].append(b)

ret = [0] * n
q = Queue()
q.put((0, 1))
while not q.empty():
    f, c = q.get()
    ret[c - 1] = count[c] + ret[f - 1]
    for n in tree[c]:
        if n != f:
            q.put((c, n))

print(*ret)


### FIXED CODE ###

from collections import defaultdict, deque

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

tree = [[] for _ in range(n)]
for _ in range(n - 1):
    a, b = map(int, input().split())
    tree[a - 1].append(b - 1)
    tree[b - 1].append(a - 1)

count = [0] * n
for _ in range(q):
    p, x = map(int, input().split())
    count[p - 1] += x

ret = [0] * n
q = deque(maxlen = n)
q.append((0, 0))
while len(q) > 0:
    f, c = q.popleft()
    ret[c] = count[c] + ret[f]
    for n in tree[c]:
        if n != f:
            q.append((c, n))

print(*ret)
import sys
from collections import defaultdict
from collections import deque

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines

N, M, V, P = map(int, input().split())

A = list(map(int, input().split()))
A.sort(reverse=True)

NUM = [0] * N
ACN = [0] * N
cnt = 0
mx = A[0]

# cnt and accumulation
for a in A:
    d = mx - a
    cnt += 1
    NUM[d] += 1
    ACN[d] = cnt

print(1)
exit()

    
# P Number Problem
PROBLEM_P = 0
p = P
for i in range(0, A[0]+1):
    if NUM[i] == 0:
        continue

    p -= NUM[i]

    if p < 0:
        PROBLEM_P = i
        break

    if i == (A[0]+1) and p > 0:
        print(N)
        exit()
        

#print("NUM", NUM)
#print("PROBLEM_P", PROBLEM_P)

# R Number Problem
R = PROBLEM_P + M

# P-1 Problem
ans = 0
NG_POINT = (P-1) * M
NG_POINT += (N - ACN[R]) * M
MV = M * V

# p problem num
num_p = ACN[PROBLEM_P] - P

for r in range(R, -1, -1):
    need_point = M
    total = (need_point * NUM[r]) + NG_POINT

    for q in range(r-1, PROBLEM_P, -1):
        if NUM[q] == 0:
            continue
        total += NUM[q] * (q - r + M)

    total += num_p * (PROBLEM_P - r + M)

    if total >= MV:
        ans = r
        break
    else:
        NG_POINT += NUM[r] * M

print(ACN[ans])


### FIXED CODE ###

import sys
from collections import defaultdict
from collections import deque

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines


N, M, V, P = map(int, input().split())

A = list(map(int, input().split()))
A.sort(reverse=True)

# A_P -> A_X (A_P - M = A_X)
A_P = A[P-1]
A_X = A[P]
i_X = P
for i in range(P, len(A)):
    if (A_P - A[i]) > M:
        A_X = A[i-1]
        i_X = i-1
        break
    elif i == (len(A)-1):
        A_X = A[i]
        i_X = i
    else:
        continue

NG_POINT = (P-1) * M


def isPossible(i):
    if (i+1) < P:
        return True
    elif i > i_X:
        return False

    MV = M * V
    ax = A[i]
    score = ax + M

    total = M + NG_POINT
    total += (N - i - 1) * M

    for j in range(i-1, P-2, -1):
        total += score - A[j]

    #print("i", i, "total", total, "NG_POINT", NG_POINT)

    if total >= MV:
        return True

    return False


left = 0
right = i_X

if not isPossible(left):
    print(1)
    exit()

if isPossible(i_X):
    print(i_X + 1)
    exit()

#print("A", A, "i_X", i_X)

for _ in range(i_X):
    #print("left", left, isPossible(left), "right", right, isPossible(right))
    if (left + 1) == right:
        break

    mid = (left + right) // 2

    if isPossible(mid):
        left = mid
    else:
        right = mid

print(left + 1)
from heapq import heappush, heappop, heapify
while 1:
    n = int(input())
    if n == 0:
        break
    S = [input() for i in range(n)]

    dup = [0]*n
    for i in range(n):
        for j in range(i+1, n):
            if S[i].find(S[j])+1:
                dup[j] = 1
            if S[j].find(S[i])+1:
                dup[i] = 1
    S = [S[i] for i in range(n) if not dup[i]]
    n -= sum(dup)

    P = [[0]*n for i in range(n)]
    for i in range(n):
        for j in range(n):
            l = len(S[i])
            pos = l
            for k in range(l):
                if S[j].startswith(S[i][k:]):
                    pos = k
                    break
            P[i][j] = len(S[j]) - (l - pos)

    que = [(len(S[i]), 1 << i, i) for i in range(n)]
    heapify(que)

    ALL = 2**n-1
    INF = 10**18
    memo = {(1 << i, i): len(S[i]) for i in range(n)}
    while que:
        l, state, i = heappop(que)
        if memo[state, i] < l:
            continue
        if state == ALL:
            print(l)
            break
        for j in range(n):
            if (state >> j) & 1 < 1:
                key = (state | (1 << j), j)
                if l + P[i][j] < memo.get(key, INF):
                    memo[key] = l + P[i][j]
                    heappush(que, (l + P[i][j], state | (1 << j), j))

### FIXED CODE ###

while 1:
    n = int(input())
    if n == 0:
        break
    S = [input() for i in range(n)]

    dup = [0]*n
    for i in range(n):
        si = S[i]
        for j in range(i+1, n):
            sj = S[j]
            if si.find(sj)+1:
                dup[j] = 1
            if sj.find(si)+1:
                dup[i] = 1
    S = [S[i] for i in range(n) if not dup[i]]
    n -= sum(dup)

    P = [[0]*n for i in range(n)]
    for i in range(n):
        si = S[i]
        l = len(si)
        for j in range(n):
            sj = S[j]
            pos = l
            for k in range(l):
                if sj.startswith(si[k:]):
                    pos = k
                    break
            P[i][j] = len(sj) - (l - pos)

    ALL = 2**n - 1
    up = 300
    memo = {(ALL, i): 0 for i in range(n)}
    def dfs(state, i):
        if (state, i) in memo:
            return memo[state, i]
        res = up
        for j in range(n):
            if (state >> j) & 1 < 1:
                res = min(res, dfs(state | (1 << j), j) + P[i][j])
        memo[state, i] = res
        return res
    print(min(dfs(1 << i, i) + len(S[i]) for i in range(n)))
def isPrime(x):
  i = 2
  while i*i <= x:
    if x % i == 0:
      return True
  return False

X = int(input())
ans = X
while not isPrime(x):
  ans += 1
print(ans)


### FIXED CODE ###

prime_table = [True]*(2*(10**5)+1)
prime_table[0], prime_table[1] = False, False
i = 2
while i * i <= 2*(10**5):
  if prime_table[i]:
    j = i*i
    while j <= 2*(10**5):
      prime_table[j] = False
      j += i
  i += 1
x = int(input())
ans = x
while not prime_table[ans]:
  ans += 1
print(ans)
from collections import deque

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

to = [[] for _ in range(n + 1)]
for i in range(n):
    a, b = map(int, input().split())
    to[a].append(b)
    to[b].append(a)

q = deque([1])
dist = [-1] * (n + 1)
# print(to)

while q:
    v = q.popleft()

    for u in to[v]:
        if dist[u] != -1:
            continue
        q.append(u)
        dist[u] = v

print("Yes")
# print(dist)

for i in range(2, n + 1):
    print(dist[i])


### FIXED CODE ###

from collections import deque

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

to = [[] for _ in range(n + 1)]
for i in range(m):
    a, b = map(int, input().split())
    to[a].append(b)
    to[b].append(a)

q = deque([1])
dist = [-1] * (n + 1)
# print(to)

while q:
    v = q.popleft()

    for u in to[v]:
        if dist[u] != -1:
            continue
        q.append(u)
        dist[u] = v

print("Yes")
# print(dist)

for i in range(2, n + 1):
    print(dist[i])
A, B = map(int(input()))
print(max(A+B, A-B, A*B))

### FIXED CODE ###

A, B = map(int, input().split())
print(max(A+B, A-B, A*B))
q = input()
     
def common()
   X = raw_input()
   Y = raw_input()
        
   for i in range(0. len(X)+1):
      s[i] = 0
        
   for i in range(0, len(X)):
      t = s + []
      for j in range(1, len(Y)):
         if s[i] == j[i]:
            s[j+1] = t[j] + 1
         elif s[j+1] < s[j]:
            s[j+1] = s[j]
     
   return s[-1]
    
for k in range(0, q):
   common()

### FIXED CODE ###

def common():
   X = raw_input()
   Y = raw_input()
  
   s = [0 for i in range(len(Y)+1)]
 
   for j in range(0, len(X)):
      t = s + []
      for k in range(0, len(Y)):
         if X[j] == Y[k]:
            s[k+1] = t[k] + 1
         elif s[k+1] < s[k]:
            s[k+1] = s[k]
  
   print s[-1]
 
q = input()
for l in range(0, q):
   common()
t=input()
for i in range(len(t)):
    if t[i] == '?':
        t[i] = 'D'

### FIXED CODE ###

t=list(input())
for i in range(len(t)):
    if t[i] == '?':
        t[i] = 'D'
print(''.join(t))
import sys
input = sys.stdin.readline
#-------------
n,k = map(int,input().split())
a = list(map(int,input().split()))
#-------------
a.sort(reverse = True)
w = 10**9 + 7
ans = 1
if k%2 == 1:#kは奇数
  for i in range(k):
    ans *= a[i]
  print(ans % w)

else:#kは偶数
  if n%2 == 0:#nは偶数
    A = n//2
    a_new = [a[2*i]*a[2*i+1] for i in range(A)]
    a_new.sort(reverse = True)
    for j in range(k//2):
      ans *= a_new[j]
    print(ans % w)
      
  else:#nは奇数
    a_plus =[]
    a_minus = []
    pos = 0
    neg = 0
    for i in range(n):
      if a[i] > 0 :
        a_plus.append(a[i])
        pos += 1
      if a[i] < 0 :
        a_minus.append(a[i])
        neg += 1
    if k > pos + neg :
      ans = 0
    print(ans % w)
    a_plus.sort(reverse = True)
    a_minus.sort()
    a_plus_new = [a_plus[2*i]*a_plus[2*i+1] for i in range(pos//2)]
    a_minus_new = [a_minus[2*i]*a_minus[2*i+1] for i in range(neg//2)]
    a_new = a_plus_new + a_minus_new
    a_new.sort(reverse = True)
    for j in range(k//2):
      ans *= a_new[j]
    print(ans % w)

### FIXED CODE ###

import sys
 
n, k = map(int, input().split())
a = [int(x) for x in input().split()]
mod = pow(10, 9)+7
zero = 0
plus = []
minus = []
for i in range(n):
  if a[i] == 0:
    zero += 1
  elif a[i] > 0:
    plus.append(a[i])
  else:
    minus.append(a[i])
 
P, M = len(plus), len(minus)
plus.sort(reverse=True)
minus.sort()
ans = 1
if n == k:
  for i in range(n):
    ans *= a[i]
    ans %= mod
elif P+M < k:
  ans = 0
elif P == 0:
  if zero and k%2:
    ans = 0
  else:
    if k%2:
      minus.reverse()
    for i in range(k):
      ans *= minus[i]
      ans %= mod
else:
  q = 0
  if k%2:
    ans *= plus[0]
    ans %= mod
    q = 1
  judge = []
  for i in range((len(plus)-q)//2):
    judge.append(plus[2*i+q]*plus[2*i+q+1])
  for i in range(len(minus)//2):
    judge.append(minus[2*i]*minus[2*i+1])
  judge.sort(reverse=True)
  for i in range(k//2):
    ans *= (judge[i]%mod)
    ans %= mod
 
print(ans)
N = int(input())
n = N%1000
if n=0:
  	print(0)
else:
  	print(1000-n)
 


### FIXED CODE ###

N = int(input())
n = N%1000
if n==0:
  	print(0)
else:
  	print(1000-n)
import sys

def main():
    N = int(input())
    
    cnt = 0
    for i in range(1, N+1, 2):
        prime_l = []
        for j in range(1, i+1, 2):
            if i%j==0:
                prime_l.append()
        if len(prime_l)==8:
            cnt+=1
    print(cnt)
main()

### FIXED CODE ###

import sys

def main():
    N = int(input())
    
    cnt = 0
    for i in range(1, N+1, 2):
        prime_l = []
        for j in range(1, i+1, 2):
            if i%j==0:
                prime_l.append(j)
        if len(prime_l)==8:
            cnt+=1
    print(cnt)
main()
N = int(input())
NM = 1000
fs = [list() for _ in range(NM+1)]

from collections import Counter
C = Count()
for i in range(2):
  if len(fs[i]) == 0:
    for j in range(i, NM+1, i):
      d = j
      while j % i == 0:
        fs[j].append(i)
        j //= i
        C[j] += 1

M = 10**9 + 7
ans = 1
for v in C.values():
  ans = (ans * v) % M
print(ans)
        
  

### FIXED CODE ###

N = int(input())
NM = 1000
fs = [list() for _ in range(NM+1)]

from collections import Counter
C = Counter()
for i in range(2, N+1):
  if len(fs[i]) == 0:
    for j in range(i, N+1, i):
      d = j
      while j % i == 0:
        fs[j].append(i)
        j //= i
        C[i] += 1

M = 10**9 + 7
ans = 1
for v in C.values():
  ans = (ans * (v+1)) % M
print(ans)
if W >= S:
  return "unsafe"
else:
  return "safe"

### FIXED CODE ###

S, W = [int(x) for x in input().split()]
 
if W >= S:
  print('unsafe')
else:
  print('safe')
a, b, c = map(int, input().split())

# 答えの出力

if (a**2 + b**2) + (2*(a*b)) < c**2:
    ans = 'Yes'
else:
    ans = 'No'

# 出力
print(ans)




### FIXED CODE ###

l = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
i = int(input())-1
print(l[i])
import math

ranks = [False for i in range(8)]
highs = 0
n = int(input())
inps = [int(i) for i in input().split()]
highs = min(len([i for i in inps if i > 3199]), 8)
inps = [i for i in inps if i <= 3199]
for i in inps:
    ranks[math.floor(i/399)] = True

lows = len([i for i in ranks if i == True]) 

minimum = max(lows, 1)
maximum = lows + highs

print(minimum, maximum)


### FIXED CODE ###

import math

ranks = [False for i in range(8)]
highs = 0
n = int(input())
inps = [int(i) for i in input().split()]
highs = len([i for i in inps if i > 3199])
inps = [i for i in inps if i <= 3199]
for i in inps:
    if i >= 1 and i <= 399:
        ranks[0] = True
    elif i >= 400 and i <= 799:
        ranks[1] = True
    elif i >= 800 and i <= 1199:
        ranks[2] = True
    elif i >= 1200 and i <= 1599:
        ranks[3] = True
    elif i >= 1600 and i <= 1999:
        ranks[4] = True
    elif i >= 2000 and i <= 2399:
        ranks[5] = True
    elif i >= 2400 and i <= 2799:
        ranks[6] = True
    elif i >= 2800 and i <= 3199:
        ranks[7] = True
lows = len([i for i in ranks if i == True])

minimum = max(lows, 1)
maximum = lows + highs

print(minimum, maximum)
n,k,c=[int(x) for x in input().split()]
s=list(input())

L=[]
R=[]

i=0
while i < n:  
    if s[i]=="o":
        L.append(i)
        i+=c
    i+=1

i=0
while i < n:
    if s[n-i-1]=="o":
        R.append(n-i-1)
        i+=c
    i+=1

days=[]
for i in range(k):
    if L[i]==R[i]:
        days.append(L[i])


for i in range(len(days)):
    print(days[i]+1)

### FIXED CODE ###

X,Y,Z=[int(x) for x in input().split()]
(X,Y)=(Y,X)
(X,Z)=(Z,X)
print(X,Y,Z)
a,b,k=map(int,input().split())
list=[]

for i in range(1,min(a,b)):
  if a % i == 0 and b % i == 0:
    list.append(i)
  else:
    pass
print(list[-k])

### FIXED CODE ###

a,b,k=map(int,input().split())
list=[]

for i in range(1,min(a,b)+1):
  if a % i == 0 and b % i == 0:
    list.append(i)
  else:
    pass
print(list[-k])