Harryxun/stf_run huggingface dataset:
import fractions
import collections
import copy

n = int(input())
ai = [int(i) for i in input().split()]

num = 10**3

mod = 10**9+7

if n == 1:
    print(1)
    exit()

def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a

pri_li = []

for i in range(n):
    pri_li.append(collections.Counter(prime_factorize(ai[i])))

com_ab = [0]*(num)

for i in range(n):
    tmp = 1
    #print(len(b_li[i]))
    keys = pri_li[i].keys()
    #print(keys)
    for j in keys:
        com_ab[j] = max(com_ab[j],pri_li[i][j])

"""
for i in range(10**3):
    if com_ab[i] > 0:
        com_num *= pow(i,com_ab[i],mod)
"""
ans = 0

for i in range(n):
    com_ab_new = copy.deepcopy(com_ab)
    #print(com_ab,com_ab_new)
    tmp = [0]*(num)
    keys = pri_li[i].keys()
    for j in keys:
        com_ab_new[j] -= pri_li[i][j]
    kari = 1
    for j in range(num):
        if com_ab_new[j] > 0:
            kari *= pow(j,com_ab_new[j],mod)
    ans += kari
    ans %= mod
    #print(ans)
        
print(ans)


### FIXED CODE ###

import collections
import math
n = int(input())
ai = [int(i) for i in input().split()]

mod = 10**9+7

if n == 1:
    print(1)
    exit()
    
    
# 素因数分解、辞書で返すやつ
# mathをimportする
def prime(n):
    factor = {}
    tmp = int(math.sqrt(n)) + 1
    for num in range(2, tmp):
        while n % num == 0:
            n //= num
            if not num in factor.keys():
                factor[num] = 1
            else:
                factor[num] += 1
        if num > n:
            break
    if n != 1:
        if not n in factor.keys():
            factor[n] = 1
        else:
            factor[n] += 1
    return factor


dic = {}
for a in ai:
    pr = prime(a)
    for num, count in pr.items():
        if not num in dic.keys():
            dic[num] = count
        else:
            if dic[num] < count:
                dic[num] = count

kari = 1
for num,count in dic.items():
    kari *= pow(num,count,mod)
    kari %= mod

kari_old = kari
ans = 0

for i in range(n):
    kari = kari_old
    #com_ab_new = copy.deepcopy(com_ab)
    #print(com_ab,com_ab_new)
    #kari = 1
    #for j in range(kosu):
    #kari *= pow(sosu_li[j][0],com_ab[sosu_li[j][0]],mod)
    kari *= pow(ai[i],mod-2,mod)
    ans += kari
    ans %= mod
    #print(ans)
    #print(ans)
        
print(ans)
n = int(raw_input())
a = raw_input()
aa = a.split(" ")
aaa = []
for i in range(len(aa)):
	aaa.append((i+1,int(aa[i])))

ctr = 0

for (a,b) in aaa:
	if (b,a) in aaa:
		aaa.remove((a,b))
		aaa.remove((b,a))
		ctr = ctr + 1

print(str(ctr))

### FIXED CODE ###

s = raw_input()
s2 = s[:4] + " " + s[4:]
print(s2)
N, A, B = map(int, input())
T = N*A
print(max(T,B))

### FIXED CODE ###

N, A, B = map(int, input().split())
T = N*A
print(min(T,B))
import sys
n,x=map(int,input().split())
l=list(map(int,input().split()))
t=0
c=0
for i in range(n+1):
  t+=l[i]
  c+=1
  if t>x:
    print(c)
    sys.exit()

### FIXED CODE ###

n,x=map(int,input().split())
l=list(map(int,input().split()))
t=0
c=1
for i in range(n):
    t+=l[i]
    if t>x:
        break
    c+=1
print(c)
H,W = map(int,input().split())
a = [list(input()) for i in range(H)]

dp=[[0]*(W) for i in range(H)]

for i in range(H):
  if a[i][0]==".":
    dp[i][0]=1

for j in range(W):
  if a[0][i]==".":
    dp[0][i]=1

for i in range(1,H):
  for j in range(1,W):
    if a[i][j]==".":
      dp[i][j]=dp[i-1][j]+dp[i][j-1]

print(dp[H-1][W-1])

### FIXED CODE ###

H,W = map(int,input().split())
a = [list(input()) for i in range(H)]

dp=[[0]*(W) for i in range(H)]

flagH = 0
flagW = 0

for i in range(H):
  if a[i][0]=="." and flagH==0:
    dp[i][0]=1
  else:
    dp[i][0]=0
    flagH=1

for j in range(W):
  if a[0][j]=="." and flagW==0:
    dp[0][j]=1
  else:
    dp[0][j]=0
    flagW=1

for i in range(1,H):
  for j in range(1,W):
    if a[i][j]==".":
      dp[i][j]=dp[i-1][j]+dp[i][j-1]

print(dp[H-1][W-1]%1000000007)
# ABC148 C

import math

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

print(A * B // math.gcd (A, B))

### FIXED CODE ###

# ABC148 C

import fractions

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

print(A * B // fractions.gcd (A, B))
s = input()
s_len = len(s)
count = 0
s = [s[i:i+3] for i in range(0,len(s),3)]
s_new = []
for i in s:
    s_new.append(i[0])
    s_new.append(i[1:3])
ans = len(s_new)
for i in range(1,len(s_new),2):
    if i!=len(s_new)-1:
        if s_new[i][0]!=s_new[i][1] and s_new[i][0]!=s_new[i-1] and s_new[i][1]!= s_new[i+1]:
            ans += 1
    else:
        if s_new[i][0]!=s_new[i][1] and s_new[i][0]!=s_new[i-1]:
            ans += 1
print(ans)


### FIXED CODE ###

s = input()
key = s[0]
temp = ''
ans = 1
for i in range(1,len(s)):
    temp += s[i]
    if key != temp:
        ans += 1
        key = temp
        temp = ''


print(ans)
N,M=map(int,input().split())
A=[[] for i in range(N)]
for i in range(M):
    Pi,Si=map(str,input().split())
    Pi=int(Pi)
    A[Pi-1].append(Si)

nAC=0
nWA=0
for i in range(N):
    if len(A[i])==0:
        pass
    else:
        j=0 
        while A[i][j]=="WA":
            nWA+=1
            j+=1
            if j==len(A[i]):
                break
            else:
                pass
        if A[i][j]=="AC":
            nAC+=1
        else:
            pass
print("{:1}{:2}".format(nAC,nWA))



### FIXED CODE ###

#print("<input>") #
N,M=map(int,input().split())
A=[[] for i in range(N)]
for i in range(M):
    Pi,Si=map(str,input().split())
    Pi=int(Pi)
    A[Pi-1].append(Si)

#print("<test>") #
#print("A=",A) #

nAC=0
nWA=0
inWA=0
j=0
for i in range(N):
    #print("i=",i) #
    if len(A[i])==0:
        pass
    else: 
        while A[i][j]=="WA":
            inWA+=1
            nWA+=1
            #print("j=",j) #
            #print("inWA=",inWA) #
            #print("nWA=",nWA) #
            if j==len(A[i])-1:
                nWA-=inWA
                break
            else:
                pass
            j+=1
        if A[i][j]=="AC":
            nAC+=1
        else:
            pass
        inWA=0
        j=0
        #print("inWA=",inWA) #
        #print("nWA=",nWA) #
        

#print("<ans>") #
print("{0} {1}".format(nAC,nWA))
num = []
n = int(input())
for i in range(5):
    num.append(int(input()))
a = min(num)
t = n // a
t += 4
if (n % a != 0):
    t += 5
else:
    
print(t)


### FIXED CODE ###

antenna = [int(input()) for i in range(5)]
k = int(input())

for i in antenna:
    antenna_out = list(filter(lambda j: (i - j) > k, antenna))
    if len(antenna_out) != 0:
        print(":(")
        break
else:
    print("Yay!")
s=list(input())
count =0
for i in range(len(s)):
  if s[i]="+":
    count +=1
  else:
    count -=1
print(count)

### FIXED CODE ###

s=list(input())
count =0
for i in range(len(s)):
  if s[i]=="+":
    count +=1
  else:
    count -=1
print(count)
n,m=map(int,input().split())
s=[input() for i in range(n)]
s=sorted(s)
print(''.join(s))


### FIXED CODE ###

s=input()
if s.count('5')==2 and s.count('7')==1:
  print('YES')
else:
  print('NO')
N = int(input())
A = sorted(list(map(int, input().split())))

for i in range(N-1):
	A[i+1] = (A[i] + A[i+1])/2

 print(A[N-1])

### FIXED CODE ###

n = int(input())
v = sorted(list(map(int, input().split())))

for i in range(n - 1):
    v[i + 1] = (v[i] + v[i + 1]) / 2

print(v[n - 1])
h,w = map(int, input().split())
a = [input().split() for i in range(h)]
 
a = {}
b = []
 
for i in h:
  a[i].insert(0,'#')
  a[i].append('#')
  
for i in w+2:
  b.append('#')
 
a.insert(0,b)
a.append(b)
  
for i in a:
  print("".join(list(map(str,i))))

### FIXED CODE ###

h,w = map(int, input().split())
a = [input().split() for i in range(h)]
b = []
 
for i in range(h):
  a[i].insert(0,'#')
  a[i].append('#')
  
for i in range(w+2):
  b.append('#')
 
a.insert(0,b)
a.append(b)
  
for i in a:
  print("".join(list(map(str,i))))
from fractions import gcd
MOD=(10**9)+7
n=int(input())
a=list(map(int,input().split()))
a_lcm=a[0]
a_invsum=0

for ai in a:
    a_lcm=(a_lcm*ai) // gcd(a_lcm, ai)
    a_invsum+=1/ai
sum_b=round(a_invsum * a_lcm)
print(sum_b%MOD)


### FIXED CODE ###

from fractions import gcd
MOD=(10**9)+7
n=int(input())
a=list(map(int,input().split()))
a_lcm=a[-1]

for ai in a:
    a_lcm=(a_lcm*ai) // gcd(a_lcm, ai)

sum_b=0
for ai in a:
    bi=a_lcm//ai
    sum_b+=bi
print(sum_b%MOD)
ni = lambda: int(ns())
na = lambda: list(map(int, input().split()))
ns = lambda: input().rstrip()  # ignore trailing spaces
 
n, m = na()
ab = []
for i in range(n):
    ab.append(na())
ab.sort(key=lambda x: x[0])
 
rem = m
ans = 0
for v in ab:
    buy = min(rem, v[1])
    ans += buy * v[0]
    rem -= buy
print(ans)

### FIXED CODE ###

H,W = map(int, input().split())
h,w = map(int, input().split())
print((H-h)*(W-w))
import sys
sys.setrecursionlimit(10**5-1)

n = int(input())
if n==1:
  print(0)
  exit()
from collections import defaultdict
edge = defaultdict(list)
for i in range(n-1):
  u, v, w = list(map(int, input().split()))
  edge[u].append((v, w))
  edge[v].append((u, w))
graph = [-1 for i in range(n+1)]

def dfs(x, c):
  nexts = edge.get(x)
  if nexts is None:
    return
  if graph[x]!=-1:
    return
  else:
    graph[x] = c
  for y, w in nexts:
    if w%2:
      dfs(y, not c)
    else:
      dfs(y, c)

dfs(1, 0)
for i in range(1, n+1):
  print(int(graph[i]))

### FIXED CODE ###

n, k = list(map(int, input().split()))
s = input()
ans = s[:k-1]+s[k-1].lower()+s[k:]
print(ans)
a = list(map(input().split()))
cnt = 0

while all(i%2==0 for i in a):
         a = [i/2 for i in a]
         cnt += 1
         print(cnt)

### FIXED CODE ###

n = input()
a = list(map(int, input().split()))
cnt = 0
while all(i%2==0 for i in a):
    a = [i/2 for i in a]
    cnt += 1
print(cnt)
a=input()
for i in range(len(a)):
  if not a[i]==a[len(a)-1-i]:
    ans=1
if ans==1:
  print("No")
else:
  print("Yes")

### FIXED CODE ###

a=input()
ans=0
for i in range(len(a)):
  if not a[i]==a[len(a)-1-i]:
    ans=1
if ans==1:
  print("No")
else:
  print("Yes")
import math
A,B,C,D = [int(i) for i in input().split()]

l= C * D // math.gcd(C, D)

s=B - A + 1 - ((B//C - (A-1)//C)+(B//D - (A-1)//D)-(B//l))
print(s)


### FIXED CODE ###

import fractions
def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)
abcd = input().split(" ")
a = int(abcd[0])
b = int(abcd[1])
c = int(abcd[2])
d = int(abcd[3])
cd = lcm(c, d)
print(b-a-(b//c-((a-1)//c + 1))-(b//d - ((a-1)//d + 1))+(b//cd-((a-1)//cd + 1)))
k,x = map(int,input().split())

li = [i for i in range(x-k+1,x+k)]

print(' '.join(li))

### FIXED CODE ###

k,x = map(int,input().split())

li = [str(i) for i in range(x-k+1,x+k)]

print(' '.join(li))
import sys
input = lambda: sys.stdin.readline().rstrip()
inp = sys.stdin.buffer.readline                               
def I(): return list(map(int,inp().split()))
from collections import Counter
from numpy import prod

n=I()[0]
s=input() 
cut=0
for i in range(len(s)):
    for j in range(i+1,len(s)):
        if 2*j-i>=len(s): break
        if len({s[i],s[j],s[2*j-i]})==3:
            cut+=1
d=Counter(s)
print(prod(list(d.values()))-cut)


            

### FIXED CODE ###

import sys
input = lambda: sys.stdin.readline().rstrip()
inp = sys.stdin.buffer.readline                               
def I(): return list(map(int,inp().split()))
from collections import Counter
from numpy import prod

n=I()[0]
s=input() 
cut=0
for i in range(len(s)):
    for j in range(i+1,len(s)):
        if 2*j-i>=len(s): break
        if len({s[i],s[j],s[2*j-i]})==3:
            cut+=1
d=Counter(s)
if len(d)<3: print(0)
else: print(prod(list(d.values()))-cut)
N = int(input())
S = input()
list_S = list(S)
N1 = 0
X = list_S.count('.')
for N in list_S:
    if list_S[N1] == '.':
            N1 +=1
    else:
        print(N1)
        list_S1 = list_S[N1:]
        X1 = list_S1.count('#')
        X2 = list_S1.count('.')
        break

if X1 > X2:
    print(X2)
else:
    print(X1)

### FIXED CODE ###

N = int(input())
S = input()                                                      
list_S = list(S)
N1 = 0
list_X =[]
X = list_S.count('.')
list_X.append(X)
    
for color in list_S:
    if list_S[N1] == '.':
        X -= 1
        list_X.append(X)
        N1 +=1
    else:
        X += 1
        list_X.append(X)
        N1 +=1

X = list_S.count('#') 
list_X.append(X)

X_MIN = min(list_X)
print(X_MIN)
s=input()

op_n=len(s) - 1

ans=0

for i in range(1 << op_n):
  sign = [""] * op_n
  for j in range(op_n):
    if ((i>>j)&1)==1:
      sign[j] = "+"
  formula = ""
  for k in range(op_n):
    formula += s[k] + sign[k]
  formula += s[op-n] 
  ans += eval(formula)
print(ans)  
    
      
       

### FIXED CODE ###

s = input()

op_n = len(s) - 1

ans = 0

for i in range(1 << op_n):
  sign = [""] * op_n
  for j in range(op_n):
    if ((i>>j)&1):
      sign[j] = "+"
  formula = ""
  for k in range(op_n):
    formula += s[k] + sign[k]
  formula += s[op_n] 
  ans += eval(formula)
print(ans)
h, n = map(int, input().split())

S = []
for _ in range(n):
    D = list(map(int, input().split()))
    S.append(D)

print(S)

dic={}


def rec(magic, nokori,sum_mp):
    if nokori<=0:
        return sum_mp
    if magic >= len(S):
        return 10**9

    dmg = S[magic][0]
    mp  = S[magic][1]

    return min(
        rec(magic  ,nokori-dmg,sum_mp+mp), # use this magic, and check this magic again
        rec(magic+1,nokori-dmg,sum_mp+mp), # use this magic, and check next magic                    rec(magic+1,nokori,sum_mp       ), # don't use this magic, and check next magic
        )

print(rec(0,h,0))

### FIXED CODE ###

h, n = map(int, input().split())
s = []
for _ in range(n):
    D = list(map(int, input().split()))
    s.append(D)

dp = [[10**10 for i in range(h+1)] for j in range(n+1)]
dp[0][0] = 0

for i in range(n):
    dmg=s[i][0]
    mp=s[i][1]
    for j in range(h+1):
        dp[i+1][j] = min(dp[i+1][j],dp[i][j])
        dp[i+1][min(j+dmg,h)] = min(dp[i+1][min(j+dmg,h)], dp[i+1][j]+mp)

print(dp[-1][-1])
n,k=map(int,input()split(" "))

print(min(n%k, k-(n%k)))


### FIXED CODE ###

n,k=map(int,input().split(" "))

r1= n%k;

r2=k-r1;

print(min(r1,r2))
h,w = map(int,input().split())
aa = [list(map(int,input().split())) for _ in range(h)]
ans=[]

for hi in range(h):
  for wi in range(w-1):
    if aa[hi][wi] % 2 == 1:      
      aa[hi][wi] -= 1
      aa[hi][wi+1] += 1
      ans.append([hi+1,wi+1,hi+1,wi+2])
      
  if hi < h-1:
    if aa[hi][-1] % 2 ==1:      
      aa[hi][-1] -=1
      aa[hi+1][-1] +=1
      ans.append([hi+1,wi+2,hi+2,wi+2])

print(len(ans))
for yp,xp,yn,xn in ans:
  print('{} {} {} {}'.format(yp,xp,yn,xn))      

### FIXED CODE ###

h,w = map(int,input().split())
aa = [list(map(int,input().split())) for _ in range(h)]
ans=[]

for hi in range(h):
  for wi in range(w-1):
    if aa[hi][wi] % 2 == 1:      
      aa[hi][wi] -= 1
      aa[hi][wi+1] += 1
      ans.append([hi+1,wi+1,hi+1,wi+2])
      
  if hi < h-1:
    if aa[hi][-1] % 2 ==1:      
      aa[hi][-1] -= 1
      aa[hi+1][-1] += 1
      ans.append([hi+1,w, hi+2, w])

print(len(ans))
for yp,xp,yn,xn in ans:
  print('{} {} {} {}'.format(yp,xp,yn,xn))
a, b = input().split()

l = a ** int(b)
r = b ** int(a)

l = int(l)
r = int(r)

if l > r:
    print(l)
else
    print(r)

### FIXED CODE ###

a, b = input().split()

l = a * int(b)
r = b * int(a)
 
l = int(l)
r = int(r)
 
if l > r:
    print(l)
else:
    print(r)
N=input()
print(N*(N+1)//2)


### FIXED CODE ###

N=int(input())
print(N*(N+1)//2)
N,A,B = map(int, input().split())
if (B-A)%2 == 0 and B-A => 0:
  print((B-A)//2+1)
if (B-A)%2 == 0 and A-B => 0:
  print((A-B)//2+1)
D = A-1
E = N-A
F = B-1
G = N-B
elif D+F > E+G and E => G:
  print(E)
elif D+F > E+G and E < G:
  print(G)
elif D+F < E+G and D => F:
  print(D)
else:
  print(F)


### FIXED CODE ###

N,A,B = map(int, input().split())
if (B-A)%2==0:
  print((B-A)//2)
else:
  print(min(A-1,N-B)+1+(B-A-1)//2)
import sys
import bisect
import itertools
import collections
import fractions
import heapq
import math
from operator import mul
from functools import reduce
from functools import lru_cache


def solve():
    readline = sys.stdin.buffer.readline
    mod = 10 ** 9 + 7
    S = input()
    T = input()

    numdic = [0]*(len(T)+1)
    for i in range(len(S)+1-len(T)):
        small = S[i:i+len(T)]
        same = 0
        for s in range(len(T)):
            if small[s] == T[s]:
                same += 1
        numdic[i] = same

    ans = len(T) - max(numdic)
    print(ans)




if __name__ == '__main__':
    solve()

### FIXED CODE ###

import sys
import bisect
import itertools
import collections
import fractions
import heapq
import math
from operator import mul
from functools import reduce
from functools import lru_cache


def solve():
    readline = sys.stdin.buffer.readline
    mod = 10 ** 9 + 7
    S = input()
    T = input()

    numdic = [0]*(100000)
    for i in range(len(S)+1-len(T)):
        small = S[i:i+len(T)]
        same = 0
        for s in range(len(T)):
            if small[s] == T[s]:
                same += 1
        numdic[i] = same

    ans = len(T) - max(numdic)
    print(ans)




if __name__ == '__main__':
    solve()
import sys
t='X'
for e in sys.stdin:
 for i in'0123456789'[(e[0]==t)*('+'!=e[1])or('+X'in e)*('+X='not in e)or('=X'in e)*(e[-1]==t):]:
  if eval(e.replace(t,i).replace('=','==')):print(i);break
 else:print('NA')


### FIXED CODE ###

import sys
p,t='+X'
for e in sys.stdin:
 for i in'0123456789'[(e[0]==t)*(e[1]!=p)or('+X'in e)*('+X='not in e):]:
  l,r=e.replace(t,i).split('=')
  if sum(map(int,l.split(p)))==int(r):print(i);break
 else:print('NA')
N,W = map(int,input().split())
w1,v = map(int,input().split())
d = [[-v],[],[],[]]
for i in range(N-1):
    w,v = map(int,input().split())
    x = w - w1
    d[x].append(-v)
d[0].sort()
n0 = len(d[0])
d[1].sort()
n1 = len(d[1])
d[2].sort()
n2 = len(d[2])
d[3].sort()
n3 = len(d[3])
d = [[[[0 for i in range(n3+1)] for j in range(n2+1)] for k in range(n1+1)] for l in range(n0+1)]
for i in range(n0):
    s = sum(d[0][:i])
    for j in range(n1):
        s += sum(d[1][:j])
        for k in range(n2):
            s += sum(d[2][:k])
            for l in range(n3):
                s += sum(d[3][:l])
                s = -s
                x = w1*(i+j+k+l) + j + 2*k + 3*l
                if x <= W:
                    d[i][j][k][l] = s
ans = 0
for i in range(n0):
    for j in range(n1):
        for k in range(n2):
            for l in range(n3):
                x = d[i][j][k][l]
                ans = max(ans,x)
print(ans)

### FIXED CODE ###

N,W = map(int,input().split())
w1,v1 = map(int,input().split())
d = [[-v1],[],[],[]]
for i in range(N-1):
    w,v = map(int,input().split())
    x = w - w1
    d[x].append(-v)
d[0].sort()
n0 = len(d[0])
d[1].sort()
n1 = len(d[1])
d[2].sort()
n2 = len(d[2])
d[3].sort()
n3 = len(d[3])
s0 = [0]
s1 = [0]
s2 = [0]
s3 = [0]
for i in range(n0):
    x = s0[-1] + d[0][i]
    s0.append(x)
for i in range(n1):
    x = s1[-1] + d[1][i]
    s1.append(x)
for i in range(n2):
    x = s2[-1] + d[2][i]
    s2.append(x)
for i in range(n3):
    x = s3[-1] + d[3][i]
    s3.append(x)
d = [[[[0 for i in range(n3+1)] for j in range(n2+1)] for k in range(n1+1)] for l in range(n0+1)]
for i in range(n0+1):
    for j in range(n1+1):
        for k in range(n2+1):
            for l in range(n3+1):
                s = s0[i] + s1[j] + s2[k] + s3[l]
                s = -s
                x = w1*(i+j+k+l) + j + 2*k + 3*l
                if x <= W:
                    d[i][j][k][l] = s
ans = 0
for i in range(n0+1):
    for j in range(n1+1):
        for k in range(n2+1):
            for l in range(n3+1):
                x = d[i][j][k][l]
                ans = max(ans,x)
print(ans)
n=int(input())
s=list(input())

b2=0
h2=0
for i in range(len(s)-1,-1,-1):
    if s[i]=="#" and h2!=0:
        b2+=1
    if s[i]==".":
        h2+=1
print(b2)


### FIXED CODE ###

a,b,c=map(int,input().split())
if (c>a and c<b) or (c<a and c>b):
    print("Yes")
else:
    print("No")
a,b=map(int,input())
if a==b:
  print("Draw")
elif a==1:
  print("Alice")
elif b==1:
  print("Bob")
elif a>b:
  print("Alice")
else:
  print("Bob")

### FIXED CODE ###

a,b=map(int,input().split())
if a==b:
  print("Draw")
elif a==1:
  print("Alice")
elif b==1:
  print("Bob")
elif a>b:
  print("Alice")
else:
  print("Bob")
import math

A, B, C, D = map(int, input().split())

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

n = B - A + 1
cn = B // C - (A - 1) // C
dn = B // D - (A - 1) // D
cdn = B // lcm(C, D) - (A - 1) // lcm(C, D)

ans = n - (cn + dn - cdn)
print(ans)

### FIXED CODE ###

import fractions

A, B, C, D = map(int, input().split())

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

n = B - A + 1
cn = B // C - (A - 1) // C
dn = B // D - (A - 1) // D
cdn = B // lcm(C, D) - (A - 1) // lcm(C, D)

ans = n - (cn + dn - cdn)
print(ans)
S = input()
k = int(input())
n = len(S)

orders = set()

for i in range(n):
    for j in range(1, 6):
        if i + j < n:
            orders.add(S[i:i + j])

print(sorted(list(orders))[k - 1])


### FIXED CODE ###

S = input()
k = int(input())
n = len(S)

orders = set()

for i in range(n):
    for j in range(1, 6):
        if i + j < n + 1:
            orders.add(S[i:i + j])

print(sorted(list(orders))[k - 1])
n, m = map(int, input().split())
ps = [int(p) for p in input().split()]
xys = [tuple(map(int, input().split())) for _ in range(m)]
 
union = {node:node for node in range(n)}
 
def root(node):
    if union[node] == node:
        return node
    union[node] = root(union[node])
    return union[node]
 
for x, y in xys:
    union[root(x)] = root(y)
 
print(sum(root(i+1) == root(p) for i, p in enumerate(ps)))

### FIXED CODE ###

n, m = map(int, input().split())
ps = [int(p)-1 for p in input().split()]
xys = [tuple(int(x)-1 for x in input().split()) for _ in range(m)]

nodes = range(n)
union = {node:node for node in nodes}

def root(node, previouss=None):
    if not previouss:
        previouss = []

    if union[node] == node:
        for previous in previouss:
            union[previous] = node
        return node
    else:
        previouss.append(node)
        return root(union[node], previouss)

for x, y in xys:
    rx = root(x)
    ry = root(y)
    union[rx] = ry

groups = {node:{node} for node, rootn in union.items() if node==rootn} 
for node in nodes:
    if node in groups:
        continue
    group = groups[root(node)]
    group.add(node)
    groups[node] = group

print(sum(p in groups[i] for i, p in enumerate(ps)))
import sys

while 1:
  str = sys.stdin.readline().strip()
  a , b = sorted(str.split(" "), key=int)
  if a , b == 0:
    break
  print(a,b)

### FIXED CODE ###

import sys

while 1:
  a , b = sys.stdin.readline().split()
  if a == b == "0":
    break
  elif int(a) > int(b) :
    print(b,a)
  else :
    print(a,b)
A, B = map(int, input().split())
print(A*(B*100//1)//100)

### FIXED CODE ###

def resolve():
    A, B = input().split()
    ans = int(A)*int(B[0])*100+int(A)*int(B[2:])
    print(str(ans)[:-2] if len(str(ans)) >= 3 else "0")
resolve()
N = input()

lastnum = N % 10

if lastnum in [0,1,6,8]
	print("pon")

elif lastnum in [2,4,5,7,9]
	print("hon")

else:
	print("bon")


### FIXED CODE ###

def solve(n):
    p = n % 10
    if p in [2,4,5,7,9]:
        return "hon"
    elif p in [0,1,6,8]:
        return "pon"
    else:
        return "bon"

n = int(input())
print(solve(n))
a,b = map(int,input().split())
if a!= b:print(2*(a+b -min(a,b))-1)
else:print(2a-1)


### FIXED CODE ###

a,b = map(int,input().split())
if a== b:print(a+b)
else:print(2*(a+b -min(a,b))-1)