peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Wrong Answer
a,b = map(int,input().split())

a_list = [i for i in range(1,a+1)]
b_list = [i for i in range(1,b+1)]


a_len = len(a_list)
b_len = len(b_list)


if a_len <= b_len:
    print(a_len)
elif a_len == b_len:
    print(a_len)
else:
    print(b_len)
# Judge status: Accepted
k, a, b = map(int, input().split())

if b - a <= 2:
    print(k + 1)
else:
    tmp = (k - a + 1) // 2
    ans = a + (b - a) * tmp
    if (k - a + 1) % 2 == 1:
        ans += 1
    print(ans)
# Judge status: Accepted
n = int(input())
a = list(map(int,input().split()))
m = 10**10
x = sum(a)
y = 0
for i in range(n):
    x -= a[i]
    y += a[i]
    m = min(abs(x-y),m)
print(m)
# Judge status: Wrong Answer
n = int(input())
print('Yes' if n%4==0 or n%7==0 or n%11==0 else 'No')
# Judge status: Accepted
A=sorted(map(int,input().split()))
a=2*A[2]-A[1]-A[0]
print((a+3)//2 if a%2 else a//2)
# Judge status: Accepted
a, b = map(int, input().split())
print(((b-a-1)*(b-a))//2-a)
# Judge status: Accepted
n = int(input())
s = input()
if len(s) <= n:
    print(s)
else:
    print(s[0:n]+"...")
# Judge status: Wrong Answer

n = int(input())
if n == 1:
    print(0)
elif n == 2:
    print(2)
else :
    x = n - 2
    combi = (n*(n-1))
    ans = ((10 ** x)%(10**9+7) * combi - combi)%(10**9+7)
    print(ans)
# Judge status: Accepted
import sys
sys.setrecursionlimit(10**9)
S = []
def add(a):
    if a > 3234566667:
        return
    x = a % 10
    if x != 0:
        S.append(a * 10 + x - 1)
        add(a * 10 + x - 1)
    S.append(a * 10 + x)
    add(a * 10 + x)
    if x != 9:
        S.append(a * 10 + x + 1)
        add(a * 10 + x + 1)
for i in range(9):
    S.append(i+1)
    add(i+1)
S.sort()
print(S[int(input())-1])
# Judge status: Accepted
n,x,y=map(int, input().split(" "))
dp=[0]*(n-1)

for i in range(1,n):
  for j in range(i+1,n+1):
    dp[min(j-i,abs(x-i)+abs(y-j)+1)-1] += 1

for i in range(n-1):
  print(dp[i])
# Judge status: Accepted
a,b = map(int, input().split())

r = 1
while True :
  if a*2 > b :
    break
  r+=1
  a = 2*a
  
print(r)
# Judge status: Accepted
N = int(input())
A = list(map(int , input().split()))
m = 100**9
for i in range(N):
    m = min(m , abs(sum(A[:i]) - sum(A[i:])))
print(m)
# Judge status: Wrong Answer
n, a, b = map(int,input().split())
kumi = n // (a + b)
nokori = n % (a + b)
if nokori == 0:
    print(a * kumi)
elif nokori >= 1 and nokori< a:
    print(a * kumi + n - a - b)
elif nokori >= a:
    print(a * kumi + a)
# Judge status: Accepted

x = int(input())
if x>=30:
    print("Yes")
else:
    print("No")
# Judge status: Wrong Answer
n = []
ans = 'Yay!'
for i in range(6):
    n.append(int(input()))
for i in range(4):
    for j in range(4):
        if abs(n[i] - n[j]) > n[5]:
            ans = ':('
print(ans)
# Judge status: Accepted
N,M=map(int,input().split())

if N==1 and M==1:
    print(1)
    exit()

if N==1 or M==1:
    print(N*M-2)
    exit()

print((N-2)*(M-2))
# Judge status: Accepted
a,b,c=map(int,input().split())

print("Yes" if a>c>b or b>c>a else "No")
# Judge status: Wrong Answer
t = input()
ans = [0]*(len(t))

for i,c in enumerate(t):
    if i !=0 and c =="?":
        ans[i] = "D"
    elif len(t)!=1:
        ans[i] = t[i]
    else:
        ans = "D"


print(*ans,sep="")
# Judge status: Accepted
import math
n = int(input())
A = list(map(int, input().split()))
A.sort(reverse=True)

ans = A[0] + 2*sum(A[1:math.floor(n/2)]) + (n%2)*A[math.floor(n/2)]
print(ans)
# Judge status: Accepted
n = int(input())
A = list(map(int, input().split()))

check = ''
ans = 0

for i in range(n-1):
    diff = A[i] - A[i+1]
    if check == '':
        if diff < 0:
            check = '+'
        elif diff > 0:
            check = '-'
    elif check != '':
        if check == '+' and diff > 0:
            ans += 1
            check = ''
        elif check == '-' and diff < 0:
            ans += 1
            check = ''

print(ans+1)
# Judge status: Accepted
n, k = map(int, input().split())
p = [int(x) for x in input().split()]
p = sorted(p)
total = 0
for i in range(k):
    total += p[i]
print(total)
# Judge status: Accepted
#!/usr/bin/env python3
import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 7)

import bisect
N = int(readline())
A = sorted(list(map(int,readline().rstrip().split())))
B = sorted(list(map(int,readline().rstrip().split())))
C = sorted(list(map(int,readline().rstrip().split())))
cnt = 0
for i in range(N):
    j = bisect.bisect_left(A,B[i])
    k = bisect.bisect_right(C,B[i])
    cnt += j*(N-k)
print(cnt)
# Judge status: Accepted
a,b = map(int,input().split())
if a%3 == 0 or b%3 == 0 or (a+b)%3 == 0:
    print('Possible')
else:
    print('Impossible')
# Judge status: Accepted
import sys
N, Y = map(int, input().split())
for i in range(N + 1):
    if 10000 * i > Y:
        break
    for j in range(N + 1 - i):
        if 10000 * i + 5000 * j > Y:
            break
        k = N - i - j
        if 10000 * i + 5000 * j + 1000 * k > Y:
            break
        if 10000 * i + 5000 * j + 1000 * k == Y:
            print('{0} {1} {2}'.format(i, j, k))
            sys.exit()
print('-1 -1 -1')
# Judge status: Accepted
n = int(input())
r = 10**7+1
l = 1

def f(n):
  return (n**2+n)//2

while r-l> 1:
  if f((l+r)//2)>n:
    r = (l+r)//2
  else:
    l = (l+r)//2

l = l+1
rm = (l+1)*l//2-n
ans = list(range(1, l+1))
ans.remove(rm)
for a in ans:
  print(a)
# Judge status: Wrong Answer
def resolve():
    N = int(input())
    B_list = list(map(int, input().split()))

    sum_point = 0
    sum_point += B_list[0]

    for i in B_list:
        sum_point += i

    print(sum_point)

if __name__ == "__main__":
    resolve()
# Judge status: Wrong Answer
a=[-2]
for i in open(0).read():a+=a[-1]+1-2*(i=='D'),
print(max(a))
# Judge status: Accepted
def inp():
    return input()
def iinp():
    return int(input())
def inps():
    return input().split()
def miinps():
    return map(int,input().split())
def linps():
    return list(input().split())
def lmiinps():
    return list(map(int,input().split()))
def lmiinpsf(n):
    return [list(map(int,input().split()))for _ in range(n)]

x = iinp()

if x == 0:
    print(1)
else:
    print(0)
# Judge status: Accepted
n = int(input())
arr = list(map(int,input().split()))
ans = 1
if 0 in arr:
    print(0)
    exit()
for i in arr:
    ans *= i
    if ans > 10**18:
        print(-1)
        exit()
print(ans if ans <= 10**18 else -1)
# Judge status: Accepted
from collections import defaultdict, deque
import sys, heapq, bisect, math, itertools, string, queue, copy, time
from fractions import gcd
import numpy as np
sys.setrecursionlimit(10**8)
INF = float('inf')
MOD = 10**9+7
EPS = 10**-7
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpl_str(): return list(sys.stdin.readline().split())

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

a_mx = np.maximum.accumulate(a_list)

ans = (a_mx - a_list).sum()

print(ans)
# Judge status: Wrong Answer
x, y = map(int, input().split())
if x <= y and abs(x) > abs(y) and y>0:
    print(abs(x)-abs(y)+1)
elif abs(x) == abs(y):
    print(1)
elif x <= y:
    print(y-x)
elif x >= 0 and y <= 0 :
    print(abs(x+y)+1)
else:
    print(abs(y-x)+2)
# Judge status: Accepted
N=[int(c) for c in input()][::-1]

dp=[[0]*2 for _ in range(len(N)+1)]
dp[0][1]=1

for i in range(len(N)):
    dp[i+1][1]=min(dp[i][0]+N[i]+1,dp[i][1]+10-N[i]-1)
    dp[i+1][0]=min(dp[i][0]+N[i],dp[i][1]+10-N[i])

print(dp[len(N)][0])
# Judge status: Wrong Answer

url = "https://atcoder.jp//contests/abc070/tasks/abc070_b"

def main():
    t = list(map(int, input().split()))
    start = max(t[0], t[2])
    end = min(t[1], t[3])
    print(end - start)

if __name__ == '__main__':
    main()
# Judge status: Wrong Answer
n=int(input())
w=list(map(int,input().split()))
m = sum(w)//2
s = 0
for i in range(n):
  s += w[i]
  if s >= m:
    if s == m:
      print(0)
    else:
      print(abs(m-s)+1)
      break
# Judge status: Accepted
import numpy as np

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

A = np.array(A)
mod = 10 ** 9 + 7
ans = 0
for i in range(60):
    b = np.count_nonzero(A >> i & 1)
    ans += 2 ** i * b * (N - b)
    ans %= mod
print(ans)
# Judge status: Wrong Answer
n = int(input())
cur = 8
bot = n
t = 0
for i in range(1, n):
    t += cur*(bot//i)
    cur *= 8
    bot *= n-i

print((10**n - 2*t - 8**n)%(10**9+7))
# Judge status: Accepted
import math
n,h = map(int,input().split())
l = []; x,y = 0,0
for _ in range(n):
    a,b = map(int,input().split())
    if a > x or a == x and b < y:
        x,y = a,b
    if b < x:continue
    l.append((a,b))
l.remove((x,y))
l = sorted(l,key=lambda x:-x[1])
ans = 0
for a,b in l:
    if b <= x:break
    if b < y and y >= h:
        print(ans+1);exit()
    h -= max(b,x)
    ans += 1
    if h <= 0:
        print(ans);exit()
d = math.ceil((max(0,h-y))/x)
print(ans + d + 1)
# Judge status: Accepted
N = int(input())
print(0.5 if N%2==0 else (N+1)//2/N)
# Judge status: Accepted
n,k = map(int,input().split())
D = list(map(int,input().split()))

ans = n
while True:
    for i in list(map(int, str(ans))):
        if i in D:
            break
    else:
        print (ans)
        exit ()

    ans += 1
# Judge status: Wrong Answer
a, b = map(int, input().split())


if a < 0 and b > 0:
    print("Zero")
elif a > 0:
    print("Positive")
elif b == -1:
    if abs(a) % 2 == 0:
        print("Positive")
    else:
        print("Negative")
elif b < 0 and a < 0:
    if abs(a) + abs(b) % 2 == 0:
        print("Negative")
    else:
        print("Positive")
# Judge status: Accepted
n = int(input())
a = tuple(map(int,input().split()))

res = 0
mi = 10**20
for e in a:
    if mi > e:
        res += 1
        mi = e
print(res)
# Judge status: Wrong Answer
n = int(input())

ans = 0
for x in range(1, n + 1):
    ans += (x + n//x * x) * (n // x) / 2
    
print(ans)
# Judge status: Accepted
from math import gcd
k = int(input())
count = 0
for a in range(1,k+1):
  for b in range(1,k+1):
    for c in range(1,k+1):
      count += gcd(gcd(a,b),c)
print(count)
# Judge status: Wrong Answer
from math import gcd,sqrt,floor
a,b = map(int,input().split())
c = gcd(a,b)
x = []
for i in range(2,floor(sqrt(c))+1):
    if c % i == 0:
        x.append(i)
        x.append(c//i)
x.sort()
y = []
i = 0
while c > 1 and i < len(x):
    if c % x[i] == 0:
        y.append(x[i])
        c = c // 2
    else:
        i += 1
print(len(y)+1)
# Judge status: Wrong Answer
N, K, S = [int(i) for i in input().split()]

a = S//2
b = S - a

val = a
ans = []
count = 0
for i in range(N):
    if(count > K):
        val = S + 1
    else:
        count += 1
        val = val ^ a ^ b
    ans += [val]


print(*ans)
# Judge status: Accepted
n, x = map(int, input().split())
a = list(map(int, input().split()))
a.sort(reverse=False)
count = 0
for i in range(n):
    if x>=a[i]:
        count += 1
        x -= a[i]
    else:
        break
if (x!=0)and(count==n):
    count -= 1
print(count)
# Judge status: Wrong Answer
# ABC 045: B – 3人でカードゲームイージー / Card Game for Three (ABC Edit)
cards = ['a', 'b', 'c']
s = [input() for _ in range(3)]
turn = 0
previous = 0

while len(s[turn]) != 0:
    previous = turn
    turn = cards.index(s[turn][0])
    s[previous] = s[previous][1:]

print(cards[previous].upper())
# Judge status: Accepted
def GCD(a, b):
    if b == 0:
        return a
    else:
        return GCD(b, a % b)

def LCM(a, b):
    return a // GCD(a, b) * b

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

    ans = 0
    for a in A:
        ans = GCD(ans, a)
    print(ans)

    return 0


if __name__ == '__main__':
    main()
# Judge status: Accepted
n, m = map(int, input().split())

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

if ans >= 0:
  print(ans)
else:
  print("-1")
# Judge status: Accepted
n, k = map(int, input().split())
A = list(map(int, input().split()))
L = [0] * n
L[0] = 1
i = A[0] - 1
j = 1
while j < k:
    if L[i] < 2:
        L[i] += 1
    else:
        break
    i = A[i] - 1
    j += 1
if j == k:
    print(i + 1)
else:
    loop = L.count(2)
    k = (k - L.count(1)) % loop
    while k > 0:
        i = A[i] - 1
        k -= 1
    print(i + 1)
# Judge status: Accepted
X = int(input())
list = []

if X == 1:
  list.append(1)

elif X == 2 or X == 3:
  list.append(2)
  
else:
  for b in range(2, X):
    p = 2
    while b ** p <= X:
      list.append(b ** p)
      p += 1
      
print(max(list))
# Judge status: Accepted
a, b, c = map(int, input().split())

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

if b - a and c - b:
    print("YES")
else:
    print("NO")
# Judge status: Accepted
N = int(input())

if N % 2 == 1:
  print(0)
  exit()
else:
  pass

cnt = 0

for i in range(26):
  cnt += N // (5 ** (i + 1) * 2)

print(cnt)
# Judge status: Wrong Answer
n, d = map(int, input().split())
if n == d:
    print(1)

if (n - (2*d + 1)) <= d:
    print(d)
elif (n - (2*d + 1)) > d:
    print(d -1)
# Judge status: Wrong Answer
n,k = map(int,input().split())
h = list(map(int,input().split()))

dp = [100000000 for i in range(n)]
dp[0] = 0

for i in range(n):
    for j in range(k+1):
        if i+j<n:
            dp[i + j] = min(dp[i] + abs(h[i] - h[i + j]), dp[i + j])
print(dp[n-1])
# Judge status: Wrong Answer
def aC(a):
  if a == 0:
    return 0
  return a*(a-1)/2

N = input()
N = int(N)
B = input().split(" ")
A = []
for a in B:
  A.append(int(a))
  
for i in range(0,N):
  pre_A = A[:]
  pre_A.pop(i)
  count_list = []
  for i in range(1,N+1):
    count_list.append(pre_A.count(i))

  ans = 0
  for i in count_list:
    ans = ans + aC(i)

  print(ans)
# Judge status: Accepted
k=int(input())
ans=[i for i in range(1,10)]
def dfs(x):
    if x>=3234566667:
        return
    for i in range(max(0,x%10-1),min(10,x%10+2)):
        ans.append(10*x+i)
        dfs(10*x+i)
for i in range(1,10):
    dfs(i)
print(sorted(ans)[k-1])
# Judge status: Accepted
n = int(input())
ans=0
def formula(n):
   return n * (n+1) //2
for i in range(1,n+1):
   x=n//i
   ans+=i*formula(x)
print(ans)
# Judge status: Accepted
As = [int(a) for a in input().split()]
if sum(As) >= 22:
  print('bust')
else:
  print('win')
# Judge status: Wrong Answer
# coding: utf-8
# Your code here!
a, b = map(int,input().split())

print(a + b)
# Judge status: Accepted
N,A,B,C,D = list(map(int, input().split()))
S = input()

flg = '##' in S[A-1:C] or '##' in S[B-1:D]
if C > D and not flg:
  f,e = max(A-1,B-2),min(D+1,N)

  flg = not '...' in S[f:e]
print("No" if flg else "Yes")
# Judge status: Accepted
from fractions import gcd
N=int(input())
A=list(map(int, input().split()))
LtR=[0]*N
LtR[0]=A[0]
RtL=[0]*N
RtL[-1]=A[-1]
for i in range(N-1):
  LtR[i+1]=gcd(A[i+1],LtR[i])
  RtL[-(i+2)]=gcd(A[-(i+2)], RtL[-(i+1)])
  
  
ans=max(LtR[-2], RtL[1])
for i in range(1,N-1):
  ans=max(ans, gcd(LtR[i-1], RtL[i+1]))
  
#print(LtR, RtL)
print(ans)
# Judge status: Accepted
N, K = map(int, input().split())
A = input()
print((N+K-3)//(K-1))
# Judge status: Wrong Answer
a, b = input().split()

ab = int(a + b)
#print(ab)
for c in range(120):
    if c ** 2 == ab:
        print("Yes")
        break
else:
    print("No")
# Judge status: Accepted
N=int(input())
n=list(map(int,input().split()))
A=len(n)
m=set(n)
B=len(m)
if A==B:
    print("YES")
else:
    print("NO")
# Judge status: Accepted
A, B = map(int,input().split())
if A < 10 and B < 10:
  print(A*B)
else:
  print(-1)
# Judge status: Wrong Answer
import math
a, b, x = map(int, input().split())
if x <= a*b:
    ans = math.degrees(math.atan(2*x/a/b**2))
    print(90 - ans)
else:
    ans = math.degrees(math.atan(2*b/a - 2*x/a**3))
    print(ans)
# Judge status: Accepted
A, B = map(int, input().split())
Amod2 = A%2
Bmod2 = B%2
if (Amod2 == Bmod2):
    print(int((A+B)/2))
else:
    print("IMPOSSIBLE")
# Judge status: Accepted
a, b = map(int, input().split())

ans = 0
if a >= b:
  for i in range(a):
    ans += b * 10**i
else:
  for i in range(b):
    ans += a * 10**i
print(ans)
# Judge status: Wrong Answer
n, k = map(int,input().split())
s = input()

press = []
temp = s[0]
cnt = 0
for string in s:
    if temp == string:
        cnt += 1
    else:
        press.append(cnt)
        temp = string
        cnt = 1
press.append(cnt)

if len(press) - 2 * k < 0:
    print(n-1)
    exit()

ans = 2 * k
for i in press:
    ans += i - 1
print(ans)
# Judge status: Accepted
import sys
input = sys.stdin.readline

o = list(input().rstrip())
e = list(input())


for i in range(len(e)):
    o.insert(i+1*(i+1), e[i])

print(''.join(o))
# Judge status: Accepted
N=input()
S=list(input())
x=0
l=list()
for i in S:
    if i=='I':
        x+=1
    else:
        x-=1
    l.append(x)
n=max(l)
print(max(0,n))
# Judge status: Wrong Answer
n, m = map(int, input().split())
x = list(map(int, input().split()))
if m == 1:
  print(0)
  exit()
x.sort()
diff = []
for i in range(m-1):
  diff.append(x[i+1] - x[i] - 1)
diff.sort(reverse=True)
print(x[-1] - x[0] + 1 - sum(diff[:n-1]) - n)
# Judge status: Wrong Answer
### N = int(input(())
N, M = map(int, input().split())
D = list(map(int, input().split()))
for i in range(N, 10000):
    j = i
    while j > 0:
        if j % 10 in D:
            break
        j = int(j/10)
    if j == 0:
        break
print(i)
# Judge status: Accepted
def main():
    N = int(input())
    field = list(map(int, input().split()))

    dpList = [0] * N
    dpList[1] = abs(field[0] - field[1])

    for i in range(2, N):
        dpList[i] = min([dpList[i - 1] + abs(field[i] - field[i - 1]), dpList[i - 2] + abs(field[i] - field[i - 2])])
        
    print(dpList[-1])

if __name__ == "__main__":
    main()
# Judge status: Wrong Answer
N = int(input())
N = N % 10
if N in (2, 4, 5, 7, 9):
    print ("hon")
elif N in (0, 1, 6, 7):
    print ("pon")
else:
    print ("bon")
# Judge status: Accepted
import math

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


def lcm(x, y):
    return (x * y) // math.gcd(x, y)

print(lcm(a, b))
# Judge status: Wrong Answer
a,b,c,d = map(int,input().split())

ac = abs(a-c) 
ab = abs(a-b)
bc = abs(b-c)
if ac <= d or ab<=d or bc <=d:
    print('Yes')
else:
    print('No')
# Judge status: Wrong Answer
n = int(input())
a = list(map(int,input().split()))
b = set(a)
c = n-len(b)
for i in b:
    if i in a:
        num = a.count(i)
        print(num)
    elif not i in a:
        print(0)

ans = '0\n'*c
print(ans)
# Judge status: Accepted
a,b=map(int,input().split())
if a <= 5:
	print(0)
elif 13 <= a:
	print(b)
else:
	print(b//2)
# Judge status: Accepted
N, A, B = map(int, input().split())
ans = 0
for i in range(1, N+1):
  if A <= sum(map(int, list(str(i)))) <= B:
    ans += i
 
print(ans)
# Judge status: Accepted
a, b, c, d = map(int, input().split())
al = [x for x in range(a,b)]
cl = [y for y in range(c,d)]

print(len(al+cl)-len(set(al+cl)))
# Judge status: Accepted
print(15 - sum(list(map(int, input().split()))))
# Judge status: Wrong Answer
n, m = map(int, input().split())
h = list(map(int, input().split()))

ary = [0 for i in range(n)]
chk = [False for i in range(n)]
for i in range(m):
	a, b = map(int, input().split())
	chk[a-1] = True
	chk[b-1] = True
	if h[a-1] < h[b-1]:
		ary[a-1] += 1
	elif h[a-1] > h[b-1]:
		ary[b-1] += 1
	else:
		continue

cnt = 0
for i in range(n):
	if ary[i] == 0 and chk[i] == True:
		cnt += 1
print (cnt)
# Judge status: Accepted
X=int(input())
if X>=400 and X<=599:
  print(8)
elif X<=799:
  print(7)
elif X<1000:
  print(6)
elif X<1200:
  print(5)
elif X<1400:
  print(4)
elif X<1600:
  print(3)
elif X<1800:
  print(2)
else:
  print(1)
# Judge status: Accepted
N = int(input())
A = [int(n) for n in input().split()]
ans = [0] * N
for i, v in enumerate(A):
    ans[v-1] = i+1

print(' '.join([str(n) for n in ans]))
# Judge status: Accepted
import sys

def main():
    C = input()
    print(chr(ord(C) + 1))

main()
# Judge status: Accepted

n = int(input())
s = input()


white = 0
for i in s:
    if(i=='.'):
        white += 1
        
# 全部黒の場合
        
ans = white

# 左からi+1 個白の場合

now = white

for i in range(n):
    if(s[i]=='#'):
        now+=1
    else:
        now-=1
    ans = min(now,ans)

print(ans)
# Judge status: Accepted
N=int(input())
for i in range((N-1)//4+2):
    if (N-4*i)%7==0:
        print("Yes")
        break
else:
    print("No")
# Judge status: Accepted
n,m = map(int,input().split())

a = (m//n)

for i in range(a, 0, -1):
    if m%i == 0:
        print(i)
        break
# Judge status: Wrong Answer
N = int(input())
ans = "No"
if N <=81:
  for i in range(2,10):
    if N%i == 0:
      ans = "Yes"
print(ans)
# Judge status: Wrong Answer
N=int(input())
for i in range(50000):
  if i*108//100==N:
    print(i)
  else:
    print(":(")
# Judge status: Wrong Answer
a,b=map(float, input().split())
b=100*b
b=b//100
print(a*b)
# Judge status: Wrong Answer
s1 = input().split()
strS = s1[0]
s2 = input().split()
strT = s2[0]

#strS = 'cupofcoffee'
#strT = 'cupofhottea'

#strS = 'abcde'
#strT = 'bcdea'

#strS = 'apple'
#strT = 'apple'

charStrSList = list(strS)
charStrTList = list(strT)

intCnt = 0
idx = 0
for sChar in charStrSList:
    if (sChar != charStrTList[idx]) :
        intCnt += 1
        print(sChar)
        print(charStrTList[idx])
        print(intCnt) 
    idx += 1

print(intCnt)
# Judge status: Accepted
import sys
from math import factorial
from fractions import Fraction
import heapq, bisect, fractions
import math
import itertools
sys.setrecursionlimit(10 ** 5 + 10)
INF = 10**15 +5
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()))

x, y, a, b, c = MAP()
p = LIST()
q = LIST()
r = LIST()

p.sort(reverse = True)
q.sort(reverse = True)

p = p[:x]
q = q[:y]
res = p + q + r
res.sort(reverse = True)
print(sum(res[:x+y]))
# Judge status: Wrong Answer
a = input()
if 'a' <= 'z' : print('a')
if 'A' <= 'Z' : print('A')
# Judge status: Accepted
n = int(input())
a = list(map(int,input().split()))
for b in a:
    if b%2 == 0:
        if b%3 == 0 or b%5 == 0:
            continue
        else:
            print('DENIED')
            exit()
else:
    print('APPROVED')
# Judge status: Accepted
X = int(input())
depo = 100
year = 0
while True:
    if depo >= X:
        break
    depo = int(depo*1.01)
    year += 1
print(year)
# Judge status: Wrong Answer
l = list(input())
strlen = l.__len__()
"yes" if strlen == list(set(l)).__len__() else "no"
# Judge status: Wrong Answer
n,x,t=map(int,input().split())
print((n//x)*t if n%t == 0 else ((n//x)*t+t))
# Judge status: Accepted
N,K,S = list(map(int,input().split()))

for i in range(K):
  print(S,end=" ")
for i in range(N-K):
  if S == 1e9:
    print(1,end=" ")
  else:
    print(S+1,end=" ")
# Judge status: Wrong Answer
k = int(input())

import math
from functools import reduce
def gcd(*numbers):
    return reduce(math.gcd, numbers)

total = 0
for a in range(1,k+1):
    for b in range(1,k+1):
        for c in range(1,k+1):
            if (a%b==0 or b%a==0) and (b%c==0 or c%b==0) and (c%a==0 or a%c==0):
                total += 1
            else:
                total += gcd(a,b,c)
print (total)
# Judge status: Accepted
import itertools
N = int(input())
L = list(map(int, input().split()))

list1 = list(itertools.combinations(L, 3))
count=0
for i in list1:
    if i[0] != i[1] and i[1] != i[2] and i[2] != i[0]:
        if i[0] + i[1] <= i[2]:
            continue
        
        if i[0] + i[2] <= i[1]:
            continue
        
        if i[2] + i[1] <= i[0]:
            continue
    
        count+=1
    else:
        continue
print(count)
# Judge status: Wrong Answer
s = input()
length = len(s)

i = 0
res = "YES"

while i < length:
  if i+4 <= length and s[i:i+5] == "dream":
    i += 5
    if i+1 <= length and s[i:i+2] == "er" and s[i+2] != "a":
      i += 2
  else:
    res = "NO"
    break
      
  if i+4 <= length and s[i:i+5] == "erase":
    i += 5
    if i+1 <= length and s[i:i+2] == "er" and s[i+2] != "a":
      i += 2
  else:
    res = "NO"
    break
        
print(res)
# Judge status: Wrong Answer
n=int(input())
a=list(map(int,input().split()))
b=list(range(1,n+1))
ab=list(zip(a,b))
ab.sort()
l=(ab[i][1] for i in range(n))
print(list(l))