peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Accepted
import collections
N = int(input())
l = list(map(int,input().split()))
c = collections.Counter(l)
dic = sorted(c.items(), reverse=True)
r = []
for j in dic:
    k = j[0]
    v = j[1]
    if v >= 4:
    	r.append(k)
    	r.append(k)
    elif v >= 2:
    	r.append(k)
    if len(r) >= 2:
      print(r[0]*r[1])
      exit()
print(0)
# Judge status: Wrong Answer
N, A, B = map(int, input().split())

t = N // (A + B)
if N % (A + B) == 0:
  mod = 0
else:
  mod = A

print(t * A + mod)
# Judge status: Accepted
import sys

sys.setrecursionlimit(10 ** 7)
f_inf = float('inf')
mod = 10 ** 9 + 7


def resolve():
    S = input()
    T = input()

    dict = {}
    for s, t in zip(S, T):
        if dict.get(t) is not None and dict[t] != s:
            print("No")
            exit()
        else:
            dict[t] = s

    if len(set(dict.values())) == len(dict):
        print("Yes")
    else:
        print("No")


if __name__ == '__main__':
    resolve()
# Judge status: Wrong Answer
n = int(input())
a = list(map(int, input().split()))
m = 1000
k = 0
flag = True
p = max(a)

if a[0] == p:
    print(1000)
    exit()

for i in range(n):
    if flag == True and a[i] < p:
        k += m // a[i]
        m = m % a[i]
        flag = False
        p = a[i]
    elif flag == False and a[i] > p:
        m += k * a[i]
        k = 0
        flag = True
        p = a[i]
print(m)
# Judge status: Accepted
N = int (input ())
T,A = map (int, input ().split ())
S = 1000000
l = [int (x) for x in input().split()]
for i in range (len(l)):
  s = abs((T-l[i]*0.006)-A)
  if s < S:
    S = s
    ans = i
print (ans+1)
# Judge status: Accepted
N=int(input())
K=int(input())
x=int(input())
y=int(input())

if N>K:
  s=x*K+y*(N-K)
else:
  s=x*N
print(int(s))
# Judge status: Accepted
n=int(input())
a=list(map(int,input().split()))
def gcd(a,b):
    while b:
        a,b = b,a%b
    return a
def lcm(a,b):
    return a*b//gcd(a,b)
k=1
for i in range(n):
    k = lcm(k,a[i])
ans=0
for i in range(n):
    ans += k//a[i]
ans %= 1000000007
print(ans)
# Judge status: Accepted
N, M = map(int, input().split())
love_count = [0 for _ in range(M)]

for _ in range(N):
    K, *A = input().split()
    for a in A:
        love_count[int(a)-1] += 1

count = 0
for num in love_count:
    if num == N:
        count += 1

print(count)
# Judge status: Accepted
import sys
def input(): return sys.stdin.readline().rstrip()


def main():
    n = int(input())
    mod = 10**9+7
    ans = pow(10, n, mod)-pow(9, n, mod)*2+pow(8, n, mod)
    print(ans % mod)


if __name__ == '__main__':
    main()
# Judge status: Wrong Answer
S = list(input())
a = 0
ans = 0
for i in range(3):
    if S[i] == 'R':
        a += 1
    else:
        if ans < a:
            ans = a
        a = 0
print(ans)
# Judge status: Accepted
n = [input() for _ in range(int(input()))]
m = [input() for _ in range(int(input()))]
l = list(set(n))
print(max(0,max(n.count(l[i])-m.count(l[i]) for i in range(len(l)))))
# Judge status: Accepted
n, k, q = map(int, input().split())
a = [int(input()) for _ in range(q)]

points = [k - q]*n
for i in range(q):
    points[a[i]-1] += 1
for i in range(n):
    if points[i] <= 0:
        print("No")
    else:
        print("Yes")
# Judge status: Accepted
n = int(input())
tmp = list(map(int, input().split()))
dic = {}
for i, j in zip(range(n), tmp):
    dic[i] = j
new = sorted(dic.items(), key = lambda x:x[1])
for i in new:
    print(i[0] + 1, end=" ")
# Judge status: Accepted
a,b,c=map(int,input().split())
if a-b>c:
    print(0)
else:
    print(c-(a-b))
# Judge status: Accepted
#!/usr/bin/env python3
import sys


def solve(N: int, D: int):
    return


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    N,D = [ int(s) for s in input().split() ]
    if N % (2*D+1) == 0:
        print(int(N / (2*D+1)))
    else:
        print(int(N / (2*D+1))+ 1)

    

if __name__ == '__main__':
    main()
# Judge status: Wrong Answer
from collections import Counter
n,k=map(int,input().split())
a=list(map(int,input().split()))
c=Counter(a).most_common()
ans=0
idx=1
while k>0:
  k-=c[-idx][1]
  ans+=c[-idx][1]
  idx+=1
print(ans)
# Judge status: Accepted
a = input()
b = input()
cnt = 0
for i in range(len(a)):
    if a[i]!=b[i]:
        cnt+=1
print(cnt)
# Judge status: Wrong Answer
x, y = map(int, input().split())

ans = 0
while x < y:
    ans += 1
    x *= 2

print(ans)
# Judge status: Wrong Answer
def main():
    X = int(input())

    l = [6,8,10,12,14,16,18]

    for i, v in enumerate(l):
        if X < v *100:
            print(8-i)
            exit()
if __name__ == "__main__":
    main()
# Judge status: Wrong Answer
x = int(input())
ar = list(map(int, input().split()))
sum_val = sum(ar)

unique_val = dict()

for i in ar:
    if i in unique_val:
        unique_val[i] += 1
    else:
        unique_val[i] = 1

q = int(input())
while(q):
    a, b = map(int, input().split())
    if a in unique_val:
        value = (b-a)*unique_val[a]
        sum_val += value
        unique_val[b] = unique_val.pop(a)
        
    print(sum_val)
    q -= 1

print(sum_val)
# Judge status: Accepted
k, s = map(int, input().split())
cnt = 0
for x in range(k+1):
    for y in range(k+1):
        z = s-x-y
        if 0<=z<=k:
            cnt += 1
print(cnt)
# Judge status: Wrong Answer
from itertools import combinations_with_replacement
n,m,q=map(int,input().split())
l=list(combinations_with_replacement(range(1,m+1),n))

res=0
lt=[list(map(int,input().split())) for _ in range(q)]

for j in range(len(l)):
    tmp=0
    for i in range(len(lt)):
        a,b,c,d = lt[i][0],lt[i][1],lt[i][2],lt[i][3]
        if l[j][b-1]-l[j][a-1] == c:
            tmp += d
    print(tmp)
    res=max(tmp,res)

print(res)
# Judge status: Wrong Answer
from collections import deque
n=int(input())
a=list(map(int,input().split()))
ad=deque(a)
tmp=1
ans=0
while ad:
    if ad[0] ==tmp:
        tmp+=1
        ad.popleft()
    else:
        ad.popleft()
        ans+=1
if ans==0:
    print(-1)
else:
    print(ans)
# Judge status: Accepted
n=int(input())
s=input()
a=[0]
for i in s:
    if i==".":a+=[a[-1]+1]
    else:a+=[a[-1]]
w=s.count(".")
print(min(i-a[i]*2+w for i in range(n+1)))
# Judge status: Wrong Answer
T = input()
length = len(T) - 1
for i in range(length):
    if T[i] == "?":
        T = T[:i] + "D" + T[i + 1:]
print(T)
# Judge status: Wrong Answer
# coding: utf-8
import copy
N=int(input())
m=len(str(N))
N1=copy.copy(N)
m2=copy.copy(m)

n=str(N)
ans=0
for i in range(m):
    m1=int(n[i])
    if m1<=5:
        ans+=m1
    else:
        ans+=10-m1

if m<=2:
    print(ans+1)
else:
    print(ans)
#print(ans)
# Judge status: Wrong Answer
x = list(map(int,input().split()))

n = x[0]
a = x[1]
b = x[2]

s = input()
c = 0
k = 0

for i in range(0,n):
  #print(c)
  if(s[i] == "c"):
    print("No")
  elif(s[i] == "a"):
    if(c < a + b):
      print("yes")
      c = c + 1
    else:
      print("No")
  else:
    if(c < a + b and k < b):
      print("Yes")
      c = c + 1
      k = k + 1
    else:
      print("No")
# Judge status: Accepted
n = int(input())
s = input()
t = input()

for i in range(n, 2*n+1):
    if s[n - (2*n-i):] == t[:2*n-i]:
        print(i)
        exit()

print(2*n)
# Judge status: Accepted
import numpy as np

bus = input()

if bus == "AAA":
    print("No")
elif bus == "BBB":
    print("No")
else:
    print("Yes")
# Judge status: Wrong Answer
n,k,s = map(int,input().split())
ans = ""
for i in range(n):
    if i > 0:
        print (" ",end="")
    if i < k:
        print (str(s),end="")
    else:
        print(str(s+1),end="")

print ("")
# Judge status: Accepted
n,k,q=map(int,input().split())
a=[int(input()) for i in range(q)]
p=[0]*n
for i in a:
  p[i-1]+=1
for j in p:
  if k-(q-j)>0:
    print("Yes")
  else:
    print("No")
# Judge status: Wrong Answer
n = int(input())
if n % 2 == 1:
    print("0")
else:
    m = int(n/2)
    count = 0
    i = 1
    while m >= 5 ** i:
      d = m // (5 ** i)
      count += d
      i += 1
    print(int(count))
# Judge status: Accepted
s = sorted(list(map(int, input().split())))
a = s.pop(-1)
b = a // 2
c = a - (a//2)
d = s[0] * s[1]
print(abs(d * b - d * c))
# Judge status: Wrong Answer
K,X = map(int,input().split())
x = " ".join(map(str,list(range(X-K,X+K))))
print(x)
# Judge status: Accepted
n = int(input())

if 400<=n<=599:
    print(8)
elif 600<=n<=799:
    print(7)
elif 800<=n<=999:
    print(6)
elif 1000<=n<=1199:
    print(5)
elif 1200<=n<=1399:
    print(4)
elif 1400<=n<=1599:
    print(3)
elif 1600<=n<=1799:
    print(2)
elif 1800<=n<=1999:
    print(1)
# Judge status: Wrong Answer
import math

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


def nibun(l, r):
  if r - l < 1:
    return l
  cnt = 0
  x = (r + l) / 2
  for i in a_list:
    cnt += math.ceil(i/x) - 1
  if cnt <= k:
    return nibun(l, x)
  else:
    return nibun(x, r)
  
if k == 0:
  print(max(a_list))
else:
  print(math.ceil(nibun(0, max(a_list))))
# Judge status: Accepted
def main():
    import sys
    input = sys.stdin.readline

    N, K = map(int, input().split())
    print(min((N%K, K - N%K)))


if __name__ == '__main__':
    main()
# Judge status: Wrong Answer
print("A" + input().upper()[0]+"C")
# Judge status: Accepted
n = int(input())
ans = 0
for i in range(1, n+1):
    a = n//i
    ans += i*0.5*a*(a+1)


print(int(ans))
# Judge status: Accepted
import math
N,D = (int(x) for x in input().split())
points = 0
for i in range(N):
  x,y = (int(x) for x in input().split())
  if math.sqrt(x*x + y*y) <= D:
    points += 1
print(points)
# Judge status: Accepted
import numpy as np

N = int(input())
A = []
B = []
for i in range(N):
    a,b=map(int, input().split())
    A.append(a)
    B.append(b)
    
Aarray = np.array(A)
Barray = np.array(B)

medA = np.median(Aarray)
medB = np.median(Barray)

if N%2 == 1:
    ans = medB-medA+1
else:
    ans = 2*(medB-medA)+1
    

print(str(int(ans)))
# Judge status: Wrong Answer
x,y = map(int, input().split())

ans = abs(abs(x)-abs(y))
if x > y and abs(x) != abs(y) and x*y > 0:
	ans+=2
elif x*y < 0:
	ans+=1

print(ans)
# Judge status: Accepted
N = int(input())
D = {}

for k in range(2,10**6):
  while N%k<1:
    N//=k
    D[k]=D.get(k,0)+1

a = 0
for i in D.values():
  t = 0
  c = 0
  while t+c<i:
    c+=1
    t+=c
  a+=c

print(a+(N>1))
# Judge status: Wrong Answer
x,a,b = map(int,input().split())
ans = min(abs(x-a),abs(x-b))
print(ans)
# Judge status: Accepted
s = str(input())
apple = []
for i in s:
    apple.append(i)
a = apple.count("1")
b = apple.count("0")
print(2 * (min(a, b)))
# Judge status: Accepted
N = int(input())

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

c = 1
a = "Yes"

for i in range(N):
  if H[i] > c:
    c = H[i]-1
  elif H[i] < c:
    a = "No"
    break
print(a)
# Judge status: Accepted
N=int(input())
ab=[list(map(int,input().split()))for _ in range(N)]
ans=0
for a,b in ab[::-1]:
    a+=ans
    if a%b==0:
        ans+=0
    else:
        ans+=b-a%b
print(ans)
# Judge status: Accepted
N,M,K = map(int,input().split())

for x in range(N+1):
  for y in range(M+1):
    kuro = x*(M-y)+y*(N-x)
    if kuro == K:
      print("Yes")
      exit()
print("No")
# Judge status: Wrong Answer
N = int(input())
ab = [list(map(int, input().split())) for _ in range(N)]


if N % 2 == 0:
    maxab = ab[(N // 2) - 1][1]
    minab = ab[N // 2][0]
    x1 = (ab[(N // 2) - 1][0] + ab[N // 2][0])
    x2 = (ab[(N // 2) - 1][1] + ab[N // 2][1])
    print(x2 - x1 + 1)

else:
    print(ab[N // 2][1] - ab[N // 2][0] + 1)
# Judge status: Wrong Answer
X,Y = map(int,input().split())
mod = 10**9+7

def p(m,n):
  a = 1
  for i in range(n):
    a = (a*(m-i)) % mod
  return a

def c(m,n):
  return p(m,n)*pow(p(n,n),mod-2,mod) % mod

if (X+Y) % 3 == 0 and Y//2 <= X <= Y**2:
  print(c((X+Y)//3,(2*X-Y)//3))
else:
  print(0)
# Judge status: Wrong Answer
def main():
    n = list(input())
    print(int(n[0])-1 + 9*(len(n)-1))

if __name__ == '__main__':
    main()
# Judge status: Accepted
import math

A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())

ceil = lambda number: math.ceil(number / 10) * 10
ceiled_A = ceil(A)
ceiled_B = ceil(B)
ceiled_C = ceil(C)
ceiled_D = ceil(D)
ceiled_E = ceil(E)

maximum_diff = 0
for minitues in [A, B, C, D, E]:
    ceiled = ceil(minitues)
    diff = ceiled - minitues
    if diff == 0: continue

    if maximum_diff is None or diff > maximum_diff:
        maximum_diff = diff

answer = ceiled_A + ceiled_B + ceiled_C + ceiled_D + ceiled_E - maximum_diff
    
print(answer)
# Judge status: Accepted
s = input()
ap = 0
zp = len(s)
for i in range(len(s)):
    if s[i] == 'A':
        ap = i
        break
    
for i in range(len(s)):
    if s[len(s)-i-1] == 'Z':
        zp = len(s)-i-1
        break

print(zp-ap+1)
# Judge status: Accepted

X = input()
N = len(X)
t = 0
ans = N
for c in X[::-1]:
    if c == 'T':
        t += 1
    elif t > 0:
        ans -= 2
        t -= 1
print(ans)
# Judge status: Accepted
n,k,*a=map(int,open(0).read().split())
v=[-1]*n
t=c=0
while v[t]<0: v[t]=c; c+=1; t=a[t]-1
l=v[t]
c-=l
print(v.index(min(k,l+(k-l)%c))+1)
# Judge status: Accepted
N = int(input())
P=list(map(int,input().split()))

a=1
for i in range(N):
  if(P[i]==0):
    a=0
    break
if a!=0:
  for i in range(N):
    a*=P[i]
    if(a>1000000000000000000):
      a=-1
      break
print(a)
# Judge status: Accepted
import math

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

if x<a*a*b/2:
    a2= x/(a*b/2)
    print(math.degrees(math.atan(b/a2)))
else:
    a3=(a*a*b-x)/(a*a/2)
    print(math.degrees(math.atan(a3/a)))
# Judge status: Wrong Answer
a=int(input())
b=int(input())
c=int(input())
x=int(input())

count=0

for i in range(a+1):
  for j in range(b+1):
    for k in range(c+1):
      if 500*a+100*b+50*c==x:
        count+=1
print(count)
# Judge status: Accepted
n, m, k = map(int, input().split())
for i in range(n+1):
  for j in range(m+1):
    if (n-i)*j + (m-j)*i == k:
      print('Yes')
      exit()
print('No')
# Judge status: Accepted
n, k = map(int, input().split())
s = list(input())
s[k-1] = chr(ord(s[k-1])+ord('a')-ord('A'))
print(''.join(s))
# Judge status: Accepted
n, W = map(int, input().split())
l = [list(map(int, input().split())) for i in range(n)]
w, v = [list(i) for i in zip(*l)]
dp = [[0] * (W+1) for i in range(n+1)]
for i in range(1, n+1):
    for j in range(W+1):
        if j - w[i-1] >= 0:
            dp[i][j] = max(dp[i-1][j], dp[i-1][j-w[i-1]]+v[i-1])
        else:
            dp[i][j] = dp[i-1][j]
print(dp[n][W])
# Judge status: Wrong Answer
c=input()
print("vowel"if c in "aiueo" else "constant")
# Judge status: Accepted
import math
n=int(input())
s=input()
if n%2==0 and s[0:int(n/2)]+s[0:int(n/2)]==s:
    print("Yes")
else:
    print("No")
# Judge status: Accepted
n, m = [int(i) for i in input().split()]
ac = [0] * n
wa = [0] * n

for i in range(m):
    p, s = input().split()
    p = int(p)
    if ac[p-1] == 0:
        if s == "AC":
            ac[p-1] = 1
        elif s == "WA":
            wa[p-1] += 1

wa_sum = 0
for i in range(n):
    if ac[i] >= 1: wa_sum += wa[i]

print(sum(ac), wa_sum)
# Judge status: Wrong Answer
h=int(input())
w=int(input())
n=int(input())
print(min(n//h,n//w)+1)
# Judge status: Accepted
N = str(input())
result = any([True if n == '7' else False for n in N])
if result:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
a,b,c=map(int,input().split())
num=a*100+b*10+c
print("YES" if num%4==0 else "NO")
# Judge status: Accepted
k, a, b = map(int, input().split())
if b-1 <= a:
    print(1 + k)
else:
    k -= a-1
    cnt = a
    if k%2 == 1:
        cnt += 1
        k -= 1
    cnt += (b-a) * k//2
    print(cnt)
# Judge status: Accepted
N, M = list(map(int,input().split()))

def divisor(n):
    res = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            res.append(i)
            if n % n//i == 0:
                res.append(n//i)

    res.sort()
    return res

d = divisor(M)
ans = 1
for x in d:
    m = M
    m -= x * (N - 1)
    if m > 0 and m % x == 0:
        ans = x

print(ans)
# Judge status: Wrong Answer
number = input()
sum = 0

for i in range(3):
  if number[i] == '1':
    sum =+ 1
print(sum)
# Judge status: Accepted
N=int(input())
A=list(map(int,input().split()))
ans=0
s=sum(A)
for i in range(N-1):
    s-=A[i]
    ans+=(A[i]*(s))%(10**9+7)
print(ans%(10**9+7))
# Judge status: Accepted
a, b = map(int, input().split())
if a <= 0 <= b:
    ans = 'Zero'
elif a <= b < 0:
    if (b-a+1) % 2:
        ans = 'Negative'
    else:
        ans = 'Positive'
else:
    ans = "Positive"
print(ans)
# Judge status: Accepted
A={1, 3, 5, 7, 8, 10, 12}
B={4, 6, 9, 11}
x, y = map(int, input().split())
print("Yes" if {x, y} <= A or {x, y} <= B else "No")
# Judge status: Accepted
S = input()
ans = 'Yes'
for i in range(0,len(S),2):
    if S[i:i+2] != 'hi':
        ans = 'No'
        break
print(ans)
# Judge status: Wrong Answer
n = int(input())
a = list(map(int, input().split()))
sa = sorted(a)
r, ans = 0, 0
for l in range(n):
    cnt = 0
    while r < n and abs(sa[r] - sa[l]) <= 2:
        cnt += 1
        r += 1

    ans = max(ans, cnt)
    if l == r:
        r += 1

print(ans)
# Judge status: Accepted
a=set(input())
if len(a)==2:
    print("Yes")
else:
    print("No")
# Judge status: Accepted
#!python3

LI = lambda: list(map(int, input().split()))

# input
N, L = LI()
S = [input() for _ in range(N)]


def main():
    S.sort()
    print("".join(S))


if __name__ == "__main__":
    main()
# Judge status: Accepted
import sys

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

if A == B:
  print("Draw")
  sys.exit()

if A == 1:
  A = 14
elif B == 1:
  B = 14

if A > B:
  print("Alice")
else:
  print("Bob")
# Judge status: Accepted
n = int(input())
nums = [int(i) for i in input().split()]

cnt = 0
for num in nums:
    if num < 0:
        cnt += 1

nums = [abs(num) for num in nums]
if cnt % 2 == 0:
    print(sum(nums))
else:
    print(sum(nums) - 2 * min(nums))
# Judge status: Accepted
import collections
n = int(input())
s = list(input()) 
c = collections.Counter(s)
mod = 10**9+7
ans = 1
for v in c.values():
    ans *= v + 1
    ans%mod
    
print((ans-1)%mod)
# Judge status: Wrong Answer
n=int(input())
ans=0
dic={}
for i in range(1,n):
    s=str(i)
    d=(s[0],s[-1])
    if d not in dic.keys():
        dic[d] = 1
    else:
        dic[d] += 1

for a in dic.keys():
    b = (a[1],a[0])
    if b in dic.keys():
        ans += dic[a]*dic[(a[1],a[0])]

print(ans)
# Judge status: Accepted
n = int(input())

l = sorted([int(i) for i in input().split()],reverse = True)

ans = 0

for i in range(1,n*2,2):
    ans += l[i]
    
print(ans)
# Judge status: Wrong Answer
d = int(input())

if d == 25:
  print('Chiristmas')
elif d == 24:
  print('Chiristmas Eve')
elif d == 23:
  print('Chiristmas Eve Eve')
else:
  print('Christmas Eve Eve Eve')
# Judge status: Accepted
n = int(input())
s = 0
for i in range(1,n+1):
    if not(i % 3 == 0 or i % 5 == 0):
        s += i
print(s)
# Judge status: Wrong Answer
import itertools

n=int(input())

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

ans = []

for v in itertools.combinations(t, n-1):
    memo = v[0]
    for i in range(1,len(v)):
        memo = memo ^ v[i]
    ans.append(memo)
print(*ans)
# Judge status: Accepted
n = int(input())
d = list(map(int, input().split()))
ans = float('inf')
fh = 0
lh = sum(d)
for i in range(0,n):
  fh += d[i]
  lh -= d[i]
  ans = min(abs(fh - lh), ans)
print(ans)
# Judge status: Accepted
import sys
def input(): return sys.stdin.readline().strip()

def resolve():
    s=input()
    if s in ['hi','hihi','hihihi','hihihihi','hihihihihi']:
            print('Yes')
    else:
            print('No')
resolve()
# Judge status: Accepted
from collections import Counter
n, k = map(int,input().split())
a = list(map(int,input().split()))
c = Counter(a)
cs = sorted(c.items(), key=lambda x:x[1])
cnt = 0
for i in range(len(cs)-k):
    cnt += cs[i][1]
print(cnt)
# Judge status: Wrong Answer
li=["SUN","MON","TUE","WED","THU","FRI","SAT" ]
day=input()
for i in range(6):
    if(li[i]==day):
        print(7-i)
# Judge status: Accepted
A,B=map(int,input().split())
A0=[100*A/8,100*(A+1)/8]
B0=[100*B/10,100*(B+1)/10]
S0=max(A0[0],B0[0])
S1=min(A0[1],B0[1])
if int(S0)>=S0 and int(S0)<S1:
    print(int(S0))
elif int(S0)+1<S1:
    print(int(S0)+1)
else:
    print(-1)
# Judge status: Accepted
a,b = map(int,input().split())
c,d = min(a,b),max(a,b)
for i in range(d):
    print(str(c),end="")
# Judge status: Accepted
s = set(input())
for i in range(26):
    if chr(ord('a')+i) not in s:
        print(chr(ord('a')+i))
        break
else:
    print('None')
# Judge status: Wrong Answer
S = input()
set_ = set()

for i in S:
    set_.add(i)

if len(set_) == 4:
    print("Yes")
else:
    print("No")
# Judge status: Accepted
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


def main():
    x = int(input())

    flag = False

    for i in range(-118, 120):
        for j in range(-119, 119):
            if i**5- j**5 == x:
                print(i, j)
                flag = True
                break
        if flag:
            break




if __name__ == '__main__':
    main()
# Judge status: Wrong Answer
string = input().upper()
x = string.index("A") ; y = string.index("Z")
z = string[x:y+1]
print(len(z))
# Judge status: Accepted
n, m = list(map(int, input().split()))
l = list(map(int, input().split()))

l.sort(reverse = True)

def check(l):
    l1 = [l[i] for i in range(0, m) if l[i] >= sum(l)/(m*4)]
    return len(l1) == m

if check(l):
    print('Yes')
else:
    print('No')
# Judge status: Accepted
import heapq

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

heap = []
heapq.heapify(heap)
for a in A:
    heapq.heappush(heap, -1*a)

for i in range(m):
    x = heapq.heappop(heap)
    newx = x / 2
    heapq.heappush(heap, newx)

ans = 0
for y in heap:
    y = -1 * y
    ans += y // 1

print(int(ans))
# Judge status: Accepted
N, M = map(int, input().split())
edge = [[] for _ in range(N)]
for _ in range(M):
    a, b = map(int, input().split())
    a, b = a-1, b-1
    edge[a].append(b)
    edge[b].append(a)

ans = {True: "POSSIBLE",
    False: "IMPOSSIBLE"}

print(ans[len(set(edge[0]) & set(edge[-1])) > 0])
# Judge status: Wrong Answer
N, K = map(int, input().split())
R, S, P = map(int, input().split())
T = input()

data = {"r": P, "s": R, "p": S}
ans = 0

for i in range(K):
    score = data[T[i]]
    ans += score

    for j in range(i + K, N, K):
        if data[T[j]] == score:
            score = 0
        else:
            score = data[T[j]]
            ans += score

print(ans)
# Judge status: Accepted
s = int(input())
mod = 10 ** 9 + 7

ans = 0
for l in range(1, 1000):
    ss = s - 2 * l - 1
    if ss < 0:
        continue
    comb = 1
    for i in range(l - 1):
        comb *= ss - i
        comb //= i + 1

    ans += comb
    ans %= mod

print(ans)
# Judge status: Accepted
import math
mod = 10**9+7
n, m = map(int, input().split())
ans = 0
if n == m:
	ans = math.factorial(n)*math.factorial(m)*2
elif abs(n-m) >= 2:
	ans = 0
else:
	b = max(n,m)
	ans = math.factorial(b)*math.factorial(b-1)
print (ans%mod)
# Judge status: Accepted
X = int(input())
ans = 1
for i in range(2, 32):
    for j in range(2, 10):
        if i ** j > X:
            continue
        ans = max(ans, i ** j)
print(ans)
# Judge status: Accepted
X = int(input())

n = 0
Xn = 100

while Xn < X:
    n = n+1
    Xn = Xn + int(Xn*0.01)

print(n)
# Judge status: Wrong Answer
a,b,c=map(int,input().split())
if a <= c <=b:
  print("Yes")
else:
  print("No")
# Judge status: Accepted
n = int(input())

for i in range(100//4+1):
  for j in range(100//7+1):
    if i*4 + j*7 == n:
      print("Yes")
      exit()
 
print("No")
# Judge status: Accepted
S = input()

if len(S)==3 and S.count('A')==2 or S.count('B')==2:
    print('Yes')

else:
    print('No')
# Judge status: Accepted
n=int(input())
l=list(map(int,input().split()))
print("Yes") if sum(l)>2*max(l) else print("No")
# Judge status: Accepted
d, t, s = map(int, input().split())
if t * s >= d:
  print("Yes")
else:
  print("No")
# Judge status: Wrong Answer
x = int(input())

ans = x // 11 * 2
if x % 11 > 6:
    ans += 2
else:
    ans += 1
print(ans)
# Judge status: Wrong Answer
N, A, B = map(int, input().split(' '))
count = 0
count += N // (A + B) * A
count += N % (A + B) % (A + 1)
print(count)