peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Accepted
import math
x = int(input())
a = 100
s = 0

for i in range(10**111):
  a = a + math.floor(a*0.01)
  s += 1
  if a >= x:
    print(s)
    exit()
# Judge status: Accepted
n= int(input())
a= list(map(int,input().split()))
ans=1
a.sort()
for i in a:
    ans=ans* i
    if i==0:
        break
    if ans>10**18:
        break

if ans > 10**18:
    print("-1")
else:
   print(ans)
# Judge status: Accepted
import sys

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

K, X = lr()
bl = 500 * K >= X
print('Yes' if bl else 'No')
# 35
# Judge status: Accepted
N = int(input())

d = [ list(map(int,input().split())) for i in range(N)]

for i in range(N-2):
    if d[i][0] == d[i][1] and d[i+1][0] == d[i+1][1] and d[i+2][0] == d[i+2][1]:
        print("Yes")
        break
else:
    print("No")
# Judge status: Accepted
# AtCoder Beginner Contest 131
# B - Bite Eating

N,L=map(int,input().split())
minabs=10**9
apples=[]
for i in range (N):
    t=L+i
    apples.append(t)
    if abs(t)<abs(minabs):
        minabs=t

full=sum(apples)

print(full-minabs)
# Judge status: Wrong Answer
N, M = map(int, input().split())
A = [list(input()) for _ in range(N)]
B = [list(input()) for _ in range(M)]

def check(x, y):
    for i in range(M):
        for j in range(M):
            if A[x + i][y + j] == B[i][j]:
                continue
            else:
                return False
    return True

for x in range(N - M):
    for y in range(N - M):
        if check(x, y):
            print("Yes")
            exit()
print("No")
# Judge status: Accepted
# 135 A

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

if a != b:
    if (a + b) % 2 == 0:
        k = (a + b) // 2
        print(k)
    else:
        print("IMPOSSIBLE")
else:
    print(0)
# Judge status: Wrong Answer
#!/usr/bin/env python3
x, y = map(int, input().split())
c = 0
if x * y < 0:
    x = abs(x)
    y = abs(y)
    c = 1

if y < x:
    print(1 + (y != 0) + x - y - c)
else:
    print(y - x + c)
# Judge status: Accepted
n, m = map(int, input().split())
a = list(map(int, input().split()))
print(max(n - sum(a), -1))
# Judge status: Accepted
N = int(input())
A = list(map(int, input().split()))
mod = int(1e9) + 7
R = [0 for _ in range(N+1)]
for i in range(N):
  R[i+1] = R[i] + A[i]
S = 0
for i in range(N-1):
  S += A[i] * (R[N] - R[i+1]) % mod
  S %= mod
print(S)
# Judge status: Accepted
import collections
S = input()[::-1]
N = len(S)
mod = [1] * N
#mod[i]=S[i]*10**i % 2019
for i in range(1, N):
    mod[i] = mod[i - 1] * 10 % 2019
for i in range(N):
    mod[i] *= int(S[i])
cumsum = [0] * N
cumsum[0] = mod[0]
for i in range(1, N):
    cumsum[i] = (cumsum[i - 1] + mod[i]) % 2019
cnt = collections.Counter(cumsum)
ans = cnt[0]
for i in range(2019):
    c = cnt[i]
    ans += c * (c - 1) // 2
print(ans)
# Judge status: Wrong Answer
def answer(a: int, b: int, c: int, k: int) -> int:
    nums = sorted((a, b, c))
    nums[-1] = nums[-1] * 2 * k

    return sum(nums)


def main():
    a, b, c = map(int, input().split())
    k = int(input())
    print(answer(a, b, c, k))


if __name__ == '__main__':
    main()
# Judge status: Wrong Answer


n, k = map(int, input().split())
d = list(input().split())


def validate(strNum):
    for i in range(0, len(strNum)):
        if strNum[i] in d:
            return False
    return True


for i in range(0, 1001):
    tf = validate(str(n))
    # print(tf)
    if tf:
        print(n)
        exit()
    n += 1
# Judge status: Accepted
N = int(input())
A = list(map(int, input().split()))
ans = [0]*N
for i in A:
    ans[i-1] += 1
for i in ans:
    print(i)
# Judge status: Accepted
h = int(input())

cnt = 0
while h > 0:
  h //= 2
  cnt += 1

ans = 1
cur = 1
for _ in range(1, cnt):
  cur *= 2
  ans += cur
  
print(ans)
# Judge status: Wrong Answer
import sys
a = []
for l in sys.stdin:
    a.append(int(l))
ans=1
import fractions
for i in range(len(a)):
	ans=a[i]*ans//fractions.gcd(a[i],ans)
print(ans)
# Judge status: Wrong Answer
a, b = map(int, input().split())

if a > b:
  print("Alice")
elif a == b:
  print("Draw")
else:
  print("Bob")
# Judge status: Wrong Answer
from fractions import gcd
a,b,c,d = map(int,input().split())

lcm = c*d/gcd(c,d)
print(b - a + 1 - int(b/c) + int((a-1)/c) - int(b/d) + int((a-1)/d) + int(b/lcm) - int((a-1)/lcm))
# Judge status: Accepted
n=int(input())
l=[]
for i in range(n):
        city,point = input().split()
        point=int(point)
        l.append([city,-point,i+1])

l=sorted(l, key = lambda x: (x[1]))
l=sorted(l, key = lambda x: (x[0]))

for i in range(n):
        print(l[i][2])
# Judge status: Accepted
n,m=map(int,input().split())
a=[int(j) for j in input().split()]
sum=0
for i in range(0,m):
    sum+=a[i]

diff=n-sum
if(diff<0):
    print(-1)
else:
    print(diff)
# Judge status: Accepted
#中心を通る時面積は二等分される
#つまり大きくない方の面積の最大値はw*h/2
#x、yが中心の時面積を2等分する直線は無限に引くことができる
#中心でない時、中心との結ぶ線は1本しか弾けない

w,h,x,y=list(map(int,input().split()))
if 2*x==w and 2*y==h:
  print(w*h/2,1)
else:
  print(w*h/2,0)
# Judge status: Accepted
a,b,c=map(int,input().split())
print(min(b//a,c))
# Judge status: Accepted
def run():
  H, N = map(int, input().split())
  ab = [list(map(int, input().split())) for n in range(N)]
  dp = [float('inf')]*(H+1)
  for h in range(H+1):
    for n in range(N):
      a, b = ab[n]
      if h <= a:
        dp[h] = min(dp[h], b)
      else:
        dp[h] = min(dp[h], dp[h-a]+b)
  print(dp[-1])
    
if __name__ == '__main__':
    run()
# Judge status: Accepted
n, k = map(int, input().split())
r, s, p = map(int, input().split())
t = list(input().rstrip())

tb = {'r': p, 's': r, 'p': s}
ans = 0
for i in range(len(t)):
    if i < k:
        ans += tb[t[i]]
    else:
        if t[i - k] == t[i]:
            t[i] = '-'
        else:
            ans += tb[t[i]]
print(ans)
# Judge status: Accepted
from bisect import bisect_right
N = int(input())
A = [int(input()) for i in range(N)]
A = [-a for a in A]

X = []
for a in A:
    i = bisect_right(X, a)
    if i == len(X):
        X.append(a)
    else:
        X[i] = a


print(len(X))
# Judge status: Accepted
N, A, B, C, D = map(int, input().split())
S = input()

if '##' in S[A-1:max(C, D)]:
    print('No')
elif C < D:
    print('Yes')
else:
    print('Yes' if '...' in S[B-2:D+1] else 'No')
# Judge status: Accepted
def main():
    x, a, b = map(int, input().split())
    if abs(x-a) < abs(x-b):
        print("A")
    else:
        print("B")


main()
# Judge status: Wrong Answer
N = int(input())
A = sorted(list(map(int, input().split())))
ai = max(A)
half_maxA = ai // 2 + 1
for idx, a in enumerate(A):
    if idx == 0:
        aj = a
    else:
        if abs(a - half_maxA) < abs(aj - half_maxA):
            aj = a
print(ai, aj)
# Judge status: Accepted
#!/usr/bin/env python3

S = input()

if "a" in S and "b" in S and "c" in S:
    print("Yes")
else:
    print("No")
# Judge status: Wrong Answer
print('CRSlauoinunndyyy'[id(id)%3::3])
# Judge status: Wrong Answer
S=input()
from collections import Counter
c = Counter(list(S))
cnt = 0
for char in list("abcdefghijklmnopqrstuvwxyz"):
    if c[char] == 2:
        cnt += 1
if cnt == 2:
    print("Yes")
else:
    print("No")
# Judge status: Accepted
x,y = map(int,input().split())
for i in range(x+1):
  if 2*i + 4*(x-i) == y:
    print("Yes")
    exit()
print("No")
# Judge status: Accepted
line = input()

a = [int(n) for n in line.split()]

k = int(input())

a.sort()
largest = a[-1]*2

for i in range(k-1):
    largest = largest * 2

a[-1] = largest
print(sum(a))

#k = int(input())


#z = a+b+x
#
#if x < a:
#    print("NO")
#elif x > a+b:
#    print("NO")
#elif x <= a+b:
#    print("YES")
#
# Judge status: Accepted
N = int(input())
ans = 0

#N, K = map(int, input().split())
#A = list(map(int, input().split()))
#flag = True
for B in range(1, N+1):
	ans += N//B
	if N%B == 0:
		ans -= 1

#ans = 0
print(ans)
# Judge status: Accepted
import math
def LI():return list(map(int,input().split()))

a,b,n=LI()

def f(x):
    ret=math.floor(a*x/b)-a*math.floor(x/b)
    return ret

if n<b:
    ans=f(n)
else:
    ans=f(b-1)
    
print(ans)
# Judge status: Accepted
import math
s = int(input())
z = math.sqrt(s) // 1
print(int(z**2))
# Judge status: Wrong Answer
S = input()
a = S.count('N')
b = S.count('S')
c = S.count('E') 
d = S.count('W')

if a*b == 0 and c*d == 0:
  print('No')
else:
  print('Yes')
# Judge status: Accepted
N, H = map(int, input().split())

A = []
B = []

for _ in range(N):
  a, b = map(int, input().split())
  A.append(a)
  B.append(b)
  

def solve():
  count = 0
  remain = H
  
  B.sort()
  
  max_a = max(A)
  
  while B:
    if remain <= 0:
      return count
    
    b = B.pop()
    
    if b < max_a:
      break
      
    remain -= b
    count += 1
  
  count += (remain + max_a - 1) // max_a
    
  return count

print(solve())
# Judge status: Accepted
s=input()
yn=0
for i in range(4):
    if s.count(s[i])!=2:
        yn=1
        break
if yn==1:
    print("No")
else:
    print("Yes")
# Judge status: Accepted
a = int(input())
b= int(input())
h = int(input())

ans = (a+b)*h//2

print(ans)
# Judge status: Accepted
n,s=open(0);a=t=s.count('E')
for i in s:t+=(-1 if i=='E' else 1);a=min(a,t)
print(a)
# Judge status: Wrong Answer
S = input()
T = input()

s = list(S[:])
t = list(T[:])

j=0

for i in range(len(S)):
    if s[i] == t[i]:
        j = j+0
    else:
        index = t.index(s[i])
        t[i],t[index] = t[index],t[i]
        j = j+1

print(j)
print(s,t)
# Judge status: Accepted
import math
import itertools
n=int(input())
town=[]
for i in range(n):
  xy=list(map(int,input().split()))
  town.append(xy)
p=list(itertools.permutations(town,n))
d=0
for i in range(len(p)):
  for j in range(len(p[i])-1):
    d+=math.sqrt((p[i][j][0]-p[i][j+1][0])**2+(p[i][j][1]-p[i][j+1][1])**2)
print(d/len(p))
# Judge status: Accepted
def is_kaibun(string):
    for i in range(int(len(string)/2)):
        if string[i] != string[-i-1]:
            return False
    return True

s=input()
list_s=list(s)
n=len(list_s)
m=int((n-1)/2)
if list_s[0:m] == list(reversed(list_s[m+1:])):
    if is_kaibun(s[0:m]):
        print("Yes")
    else:
        print("No")
else:
    print("No")
# Judge status: Wrong Answer
N,K = map(int, input().split())
h = []
for i in range(N):
    h.append(int(input()))
h.sort()
res = 10**9
for i in range(N-K):
    if res > h[i+K-1]-h[i]:
        res = h[i+K-1]-h[i]
print(res)
# Judge status: Accepted
a_cards = list(input())
b_cards = list(input())
c_cards = list(input())

cards_dict = {'a': a_cards,
        'b': b_cards,
        'c': c_cards}

turn = 'a'
while(True):
    if (cards_dict[turn] == []):
        print(turn.upper())
        break;
    trush = cards_dict[turn][0]
    cards_dict[turn] = cards_dict[turn][1:]
    turn = trush
# Judge status: Accepted
n = int(input())
pre_t, pre_x, pre_y = 0, 0, 0
for i in range(n):
    t , x, y = map(int, input().split())
    dt = t - pre_t
    dist = abs(x - pre_x) + abs(y -pre_y)
    if dist > dt or (dist+dt)%2 != 0:

        print("\nNo") 
        exit()
    pre_t, pre_x, pre_y = t, x, y
print("Yes")
# Judge status: Accepted
a,b,c,x,y = map(int,input().split())
if x < y:
    a, b, x, y = b, a, y, x
print(min(a*x+b*y,2*c*y + a*(x-y),2*c*x))
# Judge status: Wrong Answer
arr = [0]*5
for i in range(5):
    arr[i] = int(input())
time = 0
for ar in arr:
    time += (-(-ar//10))*10
amari = []
for i in arr:
    amari.append(i%10)
amari.sort()
print(time - (10-amari[0]))
# Judge status: Accepted
seq = [int(s) for s in input().split()]
if seq.count(5) == 2 and seq.count(7) == 1:
	print("YES")
else: print("NO")
# Judge status: Accepted
N,K = map(int,input().split())
a = N%K
b = abs(a-K)
print(min(a,b))
# Judge status: Wrong Answer
s, w = map(int, input().split())
if s < 2 * w:
    print("unsafe")
else:
    print("safe")
# Judge status: Wrong Answer
S = input()
f, r = int(S[:2]), int(S[2:])
#print(f)
#print(r)
if f > 12 and 0 < r <= 12:
  ans = "YYMM"
elif 0 < f <= 12 and r > 12:
  ans = "MMYY"
elif 0 < r <= 12 and 0 < f <= 12:
  ans = "AMBIGUOUS"
else:
  ans = "NA"
print(ans)
# Judge status: Accepted
A,B,C = list(map(int,input().split()))
ans = 0
if A % 2==1 and B%2==1 and C%2==1:
    listA = [A,B,C]
    listA.sort()
    print(listA[0]*listA[1])
else:
    print(0)
# Judge status: Wrong Answer
import itertools
n = int(input())
l = [i for i in range(1, n+1)]
alpha_dict = {}
for i,c in enumerate(range(ord('A'),ord('Z')+1)):
  alpha_dict[i+1] = chr(c)

ans = set()
for v in itertools.combinations_with_replacement(l, n):
  m = min(v)
  diff = m - 1 
  tmp = ""
  for n in v:
    tmp += str(alpha_dict[n-diff].lower()) 
  ans.add(tmp)

ans = sorted(list(ans))
for v in ans:
  print(v)
# Judge status: Accepted
n=int(input())-1
ans=0
for i in range(1,n+1):
  ans+=n//i
print(ans)
# Judge status: Accepted
icase=0
if icase==0:
    n=int(input())
    s=input()
    if n%2==0:
        if s[0:n//2]==s[n//2:]:
            print("Yes")
        else:
            print("No")
    else:
        print("No")
# Judge status: Accepted
N, M = map(int, input().split())

d = 1
ds = []
while d ** 2 <= M:
    if M % d == 0:
        ds.append(d)
        ds.append(M // d)
    d += 1
ds.sort(reverse=True)
for d in ds:
    if N * d <= M:
        print(d)
        break
# Judge status: Accepted
a=int(input())
b=int((a*(a+1))/2)
print(b)
# Judge status: Accepted
n,l = map(int,input().split())
s = [input() for _ in range(n)]
an = ''
for _ in range(n):
    an += min(s)
    s.remove(min(s))
print(an)
# Judge status: Accepted
n = int(input())
s = input()
ans = 0
init = True
m = s.count('#')
l = [0] * m
idx = 0
for i in range(n):
    if s[i] == '#':
        l[idx] = i
        idx += 1
ans = m
for i in range(m):
    ans = min(ans, i + (n - l[i] - 1 - (m - i - 1)))
print(ans)
# Judge status: Wrong Answer
n,k=map(int,input().split())
a=list(map(int,input().split()))
p=list(set(a))
ans=0
d=[]
for i in range(len(p)):
    d.append(a.count(p[i]))
if len(d)<=k:
    print(0)
    quit()
d.sort()
for i in range(k-1):
    ans+=d[i]
print(ans)
# Judge status: Wrong Answer
import sys

a, b, c = map(int, input().split())

flag = False
for i in range(a, b*a+1, a):
    if i % b == c:
        flag = True

print("Yes") if flag else print("No")
# Judge status: Accepted
#!/usr/bin/env python3

def solve(s):
  l = []
  for c in s:
    if c == "0" or c == "1":
      l.append(str(c))
    elif len(l):
      l.pop()
  return "".join(l)




def main():
  s = input()
  print(solve(s))
  return

if __name__ == '__main__':
  main()
# Judge status: Wrong Answer
A,B = map(int,input().split())
K = (A+B)/2
judge = isinstance(K, float)
if judge:
  print("IMPOSSIBLE")
# Judge status: Accepted
import sys
input = lambda: sys.stdin.readline().rstrip()
n = int(input())
a = list(map(int, input().split()))
f = 0
even = 0
odd = 0

for i in a:
    if i % 4 == 0:
        f += 1
    elif i % 2 == 0:
        even += 1
    else:
        odd += 1

even %= 2
if f - even - odd < -1:
    print('No')
else:
    print('Yes')
# Judge status: Wrong Answer
n = int(input().split()[0])
print(max(0, n - sum(map(int, input().split()))))
# Judge status: Accepted
import math
inf = float('inf')

n, t = map(int, input().split())
c_t = [list(map(int, input().split())) for i in range(n)]

min_c = inf
for i in c_t:
    if i[1] <= t:
        min_c = min(min_c, i[0])

if min_c == inf:
    print("TLE")
else:
    print(min_c)
# Judge status: Accepted
N = int(input())
A = list(map(int, input().split()))

ans = 0
flag = True
while flag:
    for a in A:
        if a % 2 != 0:
            flag = False
    if flag:
        A = [a // 2 for a in A]
        ans += 1
print(ans)
# Judge status: Wrong Answer
## C - Christmas Eve
N, K = map(int, input().split())
H = sorted([int(input()) for i in range(N)])
rt = 10**9
for i in range(0,N-K):
    rt = H[K - 1 + i] - H[i] if rt > H[K - 1 + i] - H[i] else rt
print(rt)
# Judge status: Wrong Answer
input_line = input()
x, y, z = map(str, input_line.split())

print(x, y, z)
resultNum = 0

for i in range(int(x)):
  loopCnt = len(str(i))
  addNum = 0
  for j in range(loopCnt):
    addNum += int(str(i)[j])
  if int(y) <= addNum <= int(z):
    resultNum += i

print(resultNum)
# Judge status: Accepted
N,K=map(int,input().split())
r,s,p=map(int,input().split())
T=list(input())


for i in range(N-K):
    if T[i]==T[i+K]:
        T[i+K]="0"

def win(c):
    if c=="r":
        return p
    elif c=="s":
        return r 
    elif c=="p":
        return s 
    else:
        return 0
ans=0
for i in T:
    ans+=win(i)
print(ans)
# Judge status: Wrong Answer
n = int(input())

if n < 1000:
    print(n)

elif n % 1000 == 0:
    print(0)

else:

    x = n // 1000

    y = (x+1)*1000

    print(y-n)
# Judge status: Accepted
N = int(input())
results = {(str(i), str(j)): 0 for i in range(1, 10) for j in range(1, 10)}


for i in range(N+1):
    s = str(i)
    if (s[0], s[-1]) in results.keys():
        results[(s[0], s[-1])] += 1

cnt = 0
for i in range(1, 10):
    for j in range(1, 10):
        cnt += results[(str(i), str(j))] * results[(str(j), str(i))]

print(cnt)
# Judge status: Accepted
import sys
from bisect import bisect_left

input = sys.stdin.readline


def main():
    N = int(input())
    A = [0] * N
    for i in range(N):
        A[i] = int(input())

    colors = []
    for a in A:
        idx = bisect_left(colors, a)
        if idx == 0:
            colors.insert(0, a)
        else:
            colors[idx - 1] = a

    ans = len(colors)
    print(ans)


if __name__ == "__main__":
    main()
# Judge status: Wrong Answer
n = int(input())

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

L = sorted(L,reverse=True)
#print(L)

cnf = 0
for i in range(1,n):
    cnf += L[i-1]
    #print(i,cnf)

print(cnf)
# Judge status: Accepted
a, b = input().split()
atxt = ''.join([a for _ in range(int(b))])
btxt = ''.join([b for _ in range(int(a))])

if atxt <= btxt:
    print(atxt)
else:
    print(btxt)
# Judge status: Accepted
n,k=map(int,input().split())
a=list(map(int,input().split()))
res=n
for i in range(n):
    if a[i]==1:
        res=i
        break

x=(res+k-2)//(k-1)
y=(max([0,n-1-x*(k-1)])+k-2)//(k-1)
print(x+y)
# Judge status: Wrong Answer
import sys
A,B=list(map(int,sys.stdin.readline().split()))
if A%2==0:
  print(A*B)
else:
  print('k')
# Judge status: Wrong Answer
N, Q = map(int, input().split())
S = input()
T = [0]*(N+1)

for i in range(1, N):
    T[i+1] = T[i] + (1 if S[i-1:i+1]=='AC' else 0)
ans = []
for _ in range(Q):
    l, r = map(int, input().split())
    ans.append(T[r] - T[l])
print(T)
print(*ans, sep='\n')
# Judge status: Wrong Answer
def findnumberofTriangles(arr,n):
	n = len(arr) 
	arr.sort() 
	count = 0
	for i in range(0, n-2): 
		k = i + 2
		for j in range(i + 1, n): 
			while (k < n and (arr[i]!=arr[j]!=arr[k]) and 
                   (arr[i] + arr[j] > arr[k])): 
				k += 1
			if(k>j): 
				count += k - j - 1

	return count

N = int(input())
A = list(map(int,input().split()))
print(findnumberofTriangles(A,N))
# Judge status: Accepted
a, b, x = map(int, input().split())
aa = (a-1) // x
bb = b // x
ans = bb-max(aa, 0)
if a == 0:
    ans += 1
print(ans)
# Judge status: Accepted
a, b, c = list(map(int, input().split()))

print(10 * max([a, b, c]) + sum([a, b, c]) - max([a, b, c]))
# Judge status: Wrong Answer
[n, k] = raw_input().split()
a = raw_input().split()
A = []
n = int(n)
k = int(k)
for i in a:
    A.append(int(i))
for i in range(k):
    t = [0] * n
    for j in range(n):
        for k in range(j - A[j], j + A[j] + 1):
            if k<0 or k>n-1: continue
            t[k] += 1
    A = t[:]
print A
# Judge status: Accepted
AB, BC, CB = map(int, input().split())
print(AB*BC//2)
# Judge status: Accepted
# 入力
a, b, c = map(int,input().split())

# 処理
if b - a == c - b:
    print('YES')
else:
    print('NO')
# Judge status: Accepted
from math import ceil


def main():
    n, k = map(int, input().split())
    a = list(map(int, input().split()))
    target = float("inf")
    target_index = []
    for i in range(n):
        if a[i] < target:
            target = a[i]
            target_index.append(i)
    answer = float("inf")
    for t in target_index:
        answer = min(answer, ceil(t / (k - 1)) + ceil((n - t - 1) / (k - 1)))
    print(answer)


if __name__ == '__main__':
    main()
# Judge status: Wrong Answer
import numpy as np
N = int(input())
l = []

for x in range(1,101):
    for y in range(1,101):
        for z in range(1,101):
            fn = x**2 + y**2 + z**2 + x*y + y*z + z*x
            l.append(fn)

for i in range(N+1):
    print(l.count(i))
# Judge status: Accepted
n = int(input())
H = list(map(int, input().split()))

counter = 0
max_counter = 0
for i in range(n-1):
  if H[i] >= H[i+1]:
    counter += 1
  else:
    max_counter = max(max_counter, counter)
    counter = 0
else:
    max_counter = max(max_counter, counter)
print(max_counter)
# Judge status: Accepted
a,b = list(map(int,input().split()))
s =input()
for i in range(a+b+1):
    if i == a:
        if s[i] !='-':
            print('No')
            break
    else:
        if s[i]=='-':
            print("No")
            break
            
        else:
            if int(s[i])<0 or 9<int(s[i]):
                print("No")
                break
else:
    print('Yes')
# Judge status: Accepted
from heapq import heappush, heappop


N, M = map(int, input().split())
X = list(map(int, input().split()))

X.sort()

if N >= M:
    print(0)
    exit()

q1 = []

for i in range(M - 1):
    sec = X[i + 1] - X[i]
    heappush(q1, -sec)

ans = 0
for _ in range(N - 1):
    ans -= heappop(q1)

print(X[-1] - X[0] - ans)
# Judge status: Accepted
A,B,T = map(int, input().split())

print(int((T+0.5)/A)*B)
# Judge status: Wrong Answer
up  = list(input())
down = list(input())

up.reverse()
if up == down:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
d = ['a','b','c','d','e','f','g','h','i','j']

n = int(input())

result = []

def fig(s, mx):
    if len(s) == n:
        result.append(s)
        return
    
    for i in range(mx+1):
        if i == mx:
            mx += 1
        fig(s + d[i], mx)

fig('', 0)
result.sort()

for r in result:
    print(''.join(r))
# Judge status: Accepted
import numpy as np
a, b = input().split()
c = int(a+b)

if((np.sqrt(c)).is_integer() == True):
    print("Yes")
else:
    print("No")
# Judge status: Wrong Answer
from functools import lru_cache

MOD = 10**9+7

x,y = list(map(int, input().split()))
a = (2*x - y) // 3
b = (2*y - x) // 3

if a == b == 0:
    print(0)
    exit()
    
@lru_cache(maxsize=None)
def fact(x):
    f = 1
    for i in range(2, x+1):
        f *= i
        f %= MOD
    return f

def fact_inv(x):
    return pow(fact(x), MOD-2, MOD)

ans = fact(a+b) * fact_inv(a) * fact_inv(b) % MOD

print(ans)
# Judge status: Accepted
n = int(input())
t=[0]
x=[0]
y=[0]
for i in range(n):
  t_inp,x_inp,y_inp=(int(x) for x in input().split())
  t.append(t_inp)
  x.append(x_inp)
  y.append(y_inp)
  
flag=True
for i in range(1,n+1):
  dt=t[i]-t[i-1]
  dist=abs(x[i]-x[i-1])+abs(y[i]-y[i-1])
  if dt<dist:
    flag=False
    break
  if dt%2 != dist%2:
    flag=False
    break
    
if flag:
  print("Yes")
else:
  print("No")
# Judge status: Wrong Answer
import fractions
A, B = map(int, input().split())
C = fractions.gcd(A, B)
ans = 1
primes = [2]

if C % 2 == 0:
  ans += 1
  while C % 2 == 0:
    C //= 2

p = 3
while C > 1:
  for prime in primes:
    if p % prime == 0:
      continue
  primes.append(p)
  ans += 1
  while C % p == 0:
    C //= p
  p += 2
print(ans)
# Judge status: Wrong Answer
S=list(input())
N=len(S)

def circle_judge(S,N):
	circle=True
	for n in range((N-1)//2):
		if S[n]!=S[N-1-n]:
			circle=False
			break
	return circle

def main():
	circle=circle_judge(S,N)
	if circle==True:
		S_h=S[:(N-1)//2]
		if len(S_h)%2==0:
			circle=False
		else:
			circle=circle_judge(S_h,(N-1)//2)
	return circle

result=main()
if result==True:
	print('Yes')
elif result==False:
	print('No')
# Judge status: Wrong Answer
from collections import Counter
n = int(input())
lst = list(map(int,input().split()))
mod = 998244353
c = dict(Counter(lst))
c = dict(sorted(c.items(), key=lambda x:x[0]))

ans = 1
pre_v = 1
for e,(k,v) in enumerate(c.items()):
    if e==0 and k!=0:
        ans = 0
        break
    elif e!=k:
        ans = 0
        break
    else:
        ans = ans*pow(pre_v, v, mod)%mod
        pre_v = v
print(ans%mod)