Harryxun/stf_run huggingface dataset:
import sys
import math

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

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

main()


### FIXED CODE ###

import sys
from fractions import gcd

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

    print(int(A * B / gcd(A, B)))

main()
N,K = map(int,input().split())
h = list(map(int,input().split()))
dp = [0]

for i in range(1,K):
  for j in range(0,i):
    dpa = 10**4+1
    if dpa > abs(h[i]-h[i-j-1])+dp[i-j-1]:
      dpa = abs(h[i]-h[i-j-1])+dp[i-j-1]
  dp.append(dpa)


for k in range(K,N):
  for l in range(K):
    dpa = 10**4+1
    if dpa > abs(h[k]-h[k-l-1])+dp[k-l-1]:
      dpa = abs(h[k]-h[k-l-1])+dp[k-l-1]
  dp.append(dpa)

print(dp[-1])

### FIXED CODE ###

def main():
    N,K = map(int,input().split())
    h = list(map(int,input().split()))
    dp = [0]*N
    for i in range(1,N):
        dp[i]= min(abs(h[i]-h[j])+dp[j] for j in range(max(0,i-K),i))
    print(dp[-1])
main()
from collections import Counter
n, k = map(int, input().split())
a = list(map(int, input().split()))

def cnt_uniq(li):
    return Counter(li).values()

uniq = sorted(cnt_uniq(a), reverse = True)[k:]
print(sum(uniq))


### FIXED CODE ###

print(input().count("1"))
N = int(input())
A = [int(x) for x in input().split()]

if n in A:
  print("YES")
else:
  print("NO")

### FIXED CODE ###

N = input()
A = input().split()
if int(N) == len(set(A)):
  print("YES")
else:
  print("NO")
N = int(input())
A = map(int,input().split())

l = [0 for i in range(9)]
for a in A:
  ind = 0
  while ind < 9:
    if a < (ind+1)*400:
      break
    ind += 1
  l[ind] += 1

ans_max = 0
ans_min = 0
for i in range(0, 8):
  if l[i] > 0:
    ans_max += 1
    ans_min += 1
if l[-1] > 0:
  ans_max = min(ans_max + l[-1] , 9)
  ans_min = max(ans_min, 1)
print(ans_min, ans_max)

### FIXED CODE ###

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

l = [0 for i in range(9)]
for a in A:
  ind = 0
  while ind < 8:
    if a < (ind+1)*400:
      break
    ind += 1
  l[ind] += 1

ans_max = 0
ans_min = 0
for i in range(0, 8):
  if l[i] > 0:
    ans_max += 1
    ans_min += 1
if l[-1] > 0:
  ans_max = ans_max + l[-1]
  ans_min = max(ans_min, 1)
print(ans_min, ans_max)
h,w=map(int,input().rstrip().split(' '))
A = list()
a = "#"*(W+2)
A.append(a)
for i in range(h):
  a = str(input().rstrip())
  a = "#"+a+"#"
  A.append(a)

a = "#"*(W+2)
A.append(a)
for a in A:
  print(a)

### FIXED CODE ###

h,w=map(int,input().rstrip().split(' '))
A = list()
a = "#"*(w+2)
A.append(a)
for i in range(h):
  a = str(input().rstrip())
  a = "#"+a+"#"
  A.append(a)

a = "#"*(w+2)
A.append(a)
for a in A:
  print(a)
import numpy as np

n = int(input())
x = np.array([input().split() for _ in range(n)], dtype=np.int)
norm2 = np.sum(x * x, axis=1)
dist = -2. * x @ x.T + norm2
dist = np.sqrt(dist.T + norm2)
print(dist.sum() / (n - 1))

### FIXED CODE ###

import numpy as np

n = int(input())
x = np.array([input().split() for _ in range(n)], dtype=np.int)
norm2 = np.sum(x * x, axis=1)
dist = -2. * x.dot(x.T) + norm2
dist = np.sqrt(dist.T + norm2)
print(dist.sum() / n)
text = input()
textdata = list(map(int, text.split()))
route_num = textdata[0]
time_lim = textdata[1]
candidate = []

for i in range(route_num):
    if textdata[2*(i+1)+1] > time_lim:
        continue
    else:
        candidate += [textdata[2*(i+1)]]
        
if len(candidate)==0:
    print("TLE")
else:
    print("{}".format(min(candidate)))

### FIXED CODE ###

textdata = list(map(int, input().split()))
route_num = textdata[0]
time_lim = textdata[1]
candidate = []

ctlist = [list(map(int, input().split())) for _ in range(route_num)]

for c, t in ctlist:
    if t > time_lim:
        continue
    else:
        candidate += [c]
        
if len(candidate)==0:
    print("TLE")
else:
    print(min(candidate))
from math import sqrt
from scipy.sparse.csgraph import dijkstra, csgraph_from_dense

def calc_dist(p1,p2):
    return max(0, sqrt((p1[0]-p2[0])**2 + (p1[1]-p2[1])**2) - (p1[2]+p2[2]))

xs, ys, xg, yg = map(int, input().split())
n = int(input())
p = [list(map(int, input().split())) for i in range(n)]
p = [[xs,ys,0], [xg,yg,0]] + p
n += 2
edges = [[float("inf")]*n for i in range(n)]
for i in range(n):
    for j in range(i,n):
        edges[i][j] = edges[j][i] = calc_dist(p[i], p[j])
edges = csgraph_from_dense(edges, null_value=float("inf"))
dist = dijkstra(edges, directed=False, indices=0)
print(dist[1])

### FIXED CODE ###

from math import sqrt
from scipy.sparse.csgraph import dijkstra, csgraph_from_dense
# https://atcoder.jp/users/nadare881

def calc_dist(p1,p2):
    return max(0, sqrt((p1[0]-p2[0])**2 + (p1[1]-p2[1])**2) - (p1[2]+p2[2]))

xs, ys, xg, yg = map(int, input().split())
n = int(input())
p = [list(map(int, input().split())) for i in range(n)]
p = [[xs,ys,0], [xg,yg,0]] + p
n += 2
edges = [[float("inf")]*n for i in range(n)]
for i in range(n):
    for j in range(i,n):
        if i == j :continue
        edges[i][j] = edges[j][i] = calc_dist(p[i], p[j])
edges = csgraph_from_dense(edges, null_value=float("inf"))
dist = dijkstra(edges, directed=False, indices=0)
print(dist[1])
9
basic
c
cpp
php
python
nadesico
ocaml
lua
assembly

### FIXED CODE ###

# -*- coding:utf-8 -*-

n = input()
n = int(n)

w = []
for i in range(n):
    _w = input()
    w.append(_w)
ans = "Yes"
for i in range(0,len(w)-1):
    for j in range(i+1,len(w)):
        if w[i] == w[j]:
            ans = "No"
for i in range(0,len(w)-1):
    if w[i][-1] != w[i+1][0] :
        ans ="No"

print(ans)
inr = lambda: list(map(int, input().split()))

N, Y = inr()

lmn = [[-1, -1, -1]]

for x in range(N+1):
    Y_rem = Y - x * 10000
    N_rem = N - x
    if Y_rem >= 0 and N_rem >= 0:
        for y in range(N_rem+1):
            Y_rem_2 = Y_rem - y * 5000
            z = N_rem - y
            flag = Y_rem_2 * z
            if Y_rem_2 == z *1000 and flag >= 0:
                lmn.append([x, y, z])
print(lmn[1][0],lmn[1][1],lmn[1][2])

### FIXED CODE ###

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

N, Y = inr()

lmn = [-1, -1, -1]

for x in range(N+1):
    for y in range(N-x+1):
        z = N - x - y
        oto_sum = 10000 * x + 5000 * y + 1000 * z
        if z >= 0 and oto_sum == Y:
            print(x, y, z)
            exit()

print(-1, -1, -1)
a = [int(input()) for i in range(4)]
print(min(a[0] + a[1]) + min(a[2] + a[3]))

### FIXED CODE ###

a = [int(input()) for i in range(4)]
print(min(a[0], a[1]) + min(a[2], a[3]))
def woo(x, y):
    z = list(map(int, input().split()))
    for i in range(1, x):
        res[i] = min(abs(z[i] - z[j]) + res[j] for j in range(max(0, i - y), i))
    return res

if __name__ == '__main__':
    res = [0]*x
    x, y = map(int, input().split())
    r = woo(x, y)
    f = len(r)-1
    print(r[f])



### FIXED CODE ###

def main():
    n, k = map(int, input().split())
    h = list(map(int, input().split()))
    a = [0] * n
    a[0] = 0
    for i in range(1, n):
        a[i] = min([a[j] + abs(h[i] - h[j]) for j in range(max(0, i - k), i)])
    print(a[-1])
 
if __name__ == '__main__':
    main()
x,y = map(int, sys.stdin.readline().rstrip("\n").split())
print(x+y/2)

### FIXED CODE ###

import sys
x,y = map(int, sys.stdin.readline().rstrip("\n").split())
print(x+y//2)
a=int(input())
if a=1:
  print(a)
elif a%2==0:
  print((a/2)/a)
else:
  print(-(-a//2)/a)
  


### FIXED CODE ###

import math
a=int(input())
b=math.floor(float(a/2))
print(float((a-b)/a))
A,B,C,D=map(int,input().split())

if(abs(C/B+1)>abs(A/C+1):
    print('No')

else:
    print('Yes')


### FIXED CODE ###

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


while(1):

    C=C-B
    if(C<=0):
        print('Yes')
        exit(0)
    A=A-D
    if(A<=0):
        print('No')
        exit(0)
d,g = map(int, input().split())

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

ans=float('inf')
for bit in range(2**d):
    b = 0
    score = 0
    num = 0
    # ボーナスを貰えるまで問題を解く場合を計算
    # bit探索し、ボーナスを貰うパターンを網羅する
    for i in range(d):
        if (bit >> i) & 1:
            # 問題を解いた点 + ボーナス
            score += pc[0][i] * (i+1) * 100 + pc[1][i]
            # 解いた問題数
            num += pc[0][i]
        else:
            # ボーナスを貰えるまで解かない問題の場合
            # この値には最終的にはボーナスを貰えるまでは解かない、最大点がもらえる問題の番号が入る
            b = i

    # ボーナスを貰えるまでは解かない問題による加点と回答の更新を行う
    for j in range(pc[b][0]):
        if score>=g and num<ans:
            ans=num
        score+=(b+1)*100
        num+=1

print(ans)

### FIXED CODE ###

d,g = map(int, input().split())

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

ans=float('inf')
for bit in range(2**d):
    b = 0
    score = 0
    num = 0
    # ボーナスを貰えるまで問題を解く場合を計算
    # bit探索し、ボーナスを貰うパターンを網羅する
    for i in range(d):
        if (bit >> i) & 1:
            # 問題を解いた点 + ボーナス
            score += pc[i][0] * (i+1) * 100 + pc[i][1]
            # 解いた問題数
            num += pc[i][0]
        else:
            # ボーナスを貰えるまで解かない問題の場合
            # この値には最終的にはボーナスを貰えるまでは解かない、最大点がもらえる問題の番号が入る
            b = i

    # ボーナスを貰えるまでは解かない問題による加点と回答の更新を行う
    for j in range(pc[b][0]):
        if score>=g and num<ans:
            ans=num
        score+=(b+1)*100
        num+=1

print(ans)
X,Y,Z = map(int,input().split())
print(f"{Z} {X} {Y}")

### FIXED CODE ###

X,Y,Z = map(int,input().split())
print(Z ,X ,Y)
a,b,c = input()
  
print('Yes' if a==c else ;'No') 

### FIXED CODE ###

a,b,c = input()
  
print('Yes' if a==c else 'No')
import math
import copy
import sys
import fractions
import numpy as np
from functools import reduce
import statistics
input = sys.stdin.readline
sys.setrecursionlimit(10**6)

# ===FUNCTION===

def getInputInt():
    inputNum = int(input())
    return inputNum


def getInputListInt():
    outputData = []
    inputData = input().split()
    outputData = [int(n) for n in inputData]

    return outputData


def getSomeInputInt(n):
    outputDataList = []
    for i in range(n):
        inputData = int(input())
        outputDataList.append(inputData)

    return outputDataList


def getSomeInputListInt(n):
    inputDataList = []
    outputDataList = []
    for i in range(n):
        inputData = input().split()
        inputDataList = [int(n) for n in inputData]
        outputDataList.append(inputDataList)

    return outputDataList


# ===CODE===

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

data2 = getSomeInputListInt(n-1)

data3 = getSomeInputListInt(q)

ans = np.zeros(n)

for i in range(len(data3)):
    ans[data3[i][0]-1] += data3[i][1]

treeList = [[] for _ in range(n)]
for i in range(n-1):
  a,b = map(int, input().split())
  a -= 1
  b -= 1
  treeList[a].append(b) # a<bとは限らないため、双方向にする
  treeList[b].append(a)

def treeTrace(crnt, prnt):
    for i in range(len(treeList[crnt])):
        if prnt == treeList[crnt][i]:
            continue
        ans[treeList[crnt][i]] += ans[crnt]

        treeTrace(treeList[crnt][i], crnt)

treeTrace(0, -1)

for s in ans:
    print(int(s), end =" ")


### FIXED CODE ###

import sys
input = sys.stdin.readline #for input speed
sys.setrecursionlimit(10**6) #for deep recursion
n, q = map(int, input().split())

tree_index = [[] for _ in range(n)]
for i in range(n-1):
  a,b = map(int, input().split())
  a -= 1
  b -= 1
  tree_index[a].append(b) # a<bとは限らないため、双方向にする
  tree_index[b].append(a)
ans = [0] * n
for i in range(q):
  p, x = map(int, input().split())
  ans[p-1] += x
def dfs(cur, par):
    for chl in tree_index[cur]:
      if chl == par: #parentとchildが等しい時はスキップ
        continue
      ans[chl] += ans[cur] 
      dfs(chl, cur)
dfs(0, -1)
print(*ans)
import numpy as np
N ,M = (int(x) for x in input().split())
a = np.array([int(x) for x in input().split()])
for i in range(M):
    B,C = (int(x) for x in input().split())
    a = np.insert(a, np.shape(a) ,np.full(B, C))

a_sort = np.sort(a)
print(np.sum(a_sort[-N:]))

### FIXED CODE ###

a,b = (int(x) for x in input().split())

if a < 6:
    print(0)
elif a < 13:
    print(int(b / 2))
else:
    print(b)
A,B = map(int, input().split())
n =1
while True:
    if B == 1:
        print(0)
        break
    if B <= n*(A-1)+1:
        print(n)
        break
    else:
        n += 1

### FIXED CODE ###

a,b,c =input()
d,e,f =input()
cnt = 0
if a == d:
    cnt = cnt +1
if b == e:
    cnt = cnt +1
if c == f:
    cnt = cnt +1
print(cnt)
import sys

n = int(sys.stdin.readline().strip())
S = map(int, sys.stdin.readline().strip().split(" "))

n = int(sys.stdin.readline().strip())
T = map(int, sys.stdin.readline().strip().split(" "))

res = []

for t in T:
    rse.append(S.count(t))
print sum(res)

### FIXED CODE ###

import sys

n = int(sys.stdin.readline().strip())
S = map(int, sys.stdin.readline().strip().split(" "))

n = int(sys.stdin.readline().strip())
T = map(int, sys.stdin.readline().strip().split(" "))

res = []

for t in T:
    res.append(int(S.count(t) != 0))
print sum(res)
n, k = map(lambda x: int(x), input().split())
s = input()

s[k] = s[k].upper()
print(s)

### FIXED CODE ###

n, k = map(lambda x: int(x), input().split())
s = input()
 
str = ""
for i in range(n):
  if i + 1 == k:
    str += s[i].lower()
  else:
    str += s[i]
print(str)
from sys import setrecursionlimit

def find(par,i):
    if par[i]<0:
        return i
    par[i] = find(par,par[i])
    return par[i]

def unite(par,i,j):
    ri = find(par,i)
    rj = find(par, j)
    if ri==rj:
        return
    par[rj] += par[ri]
    par[ri] = rj
    
setrecursionlimit(10**6)
n,m = map(int,input().split())

parent = [-1]*n
for _ in range(m):
    a,b = map(lambda x:int(x)-1,input().split())
    unite(parent,a,b)
    print(parent)
    

print(-min(parent))

### FIXED CODE ###

from sys import setrecursionlimit

def find(par,i):
    if par[i]<0:
        return i
    par[i] = find(par,par[i])
    return par[i]

def unite(par,i,j):
    ri = find(par,i)
    rj = find(par, j)
    if ri==rj:
        return
    par[rj] += par[ri]
    par[ri] = rj
    
setrecursionlimit(10**6)
n,m = map(int,input().split())

parent = [-1]*n
for _ in range(m):
    a,b = map(lambda x:int(x)-1,input().split())
    unite(parent,a,b)
    
print(-min(parent))
from itertools import accumulate

# 整数Xのときの[高橋くんが上から取る連続枚数]が、k枚以下（k+1以上にはならない）かどうか判定する
def check(X, k):
    # 青木くんがLより先にRを取れれば、条件を満たす
    L, R = As[N-2*k-1], As[N-k-1]
    return abs(L-X) > abs(X-R)

N, Q = map(int, input().split())
As = list(map(int, input().split()))
Xs = [(int(input()), iX) for iX in range(Q)]

numT = (N+1) // 2  # 高橋くんが取るカードの枚数
Ascs = As[::2] if N % 2 else As[1::2]
Descs = As[::-1]
accAscs = [0] + list(accumulate(Ascs))
accDescs = [0] + list(accumulate(Descs))

# 高橋くんが上から連続k枚を取る場合のスコア
scores = [0] * (numT+1)
for k in range(1, numT+1):
    scores[k] = accDescs[k] + accAscs[numT - k]

# Xの降順で処理する
anss = [0] * Q
k = 1
for X, iX in sorted(Xs, reverse=True):
    # [k枚以下]になる最小のkを求める
    while not check(X, k):
        k += 1
    anss[iX] = scores[k]

print('\n'.join(map(str, anss)))


### FIXED CODE ###

from itertools import accumulate
import sys

# 整数Xのときの[高橋くんが上から取る連続枚数]が、k枚以下（k+1以上にはならない）かどうか判定する
def check(X, k):
    # 青木くんがLより先にRを取れれば、条件を満たす
    L, R = As[N-2*k-1], As[N-k-1]
    return abs(L-X) > abs(X-R)

N, Q = map(int, input().split())
As = list(map(int, input().split()))
Xs = [(int(input()), iX) for iX in range(Q)]

if N == 2:
    print('\n'.join(map(str, [As[-1]]*Q)))
    sys.exit()

numT = (N+1) // 2  # 高橋くんが取るカードの枚数
Ascs = As[::2] if N % 2 else As[1::2]
Descs = As[::-1]
accAscs = [0] + list(accumulate(Ascs))
accDescs = [0] + list(accumulate(Descs))

# 高橋くんが上から連続k枚を取る場合のスコア
scores = [0] * (numT+1)
for k in range(1, numT+1):
    scores[k] = accDescs[k] + accAscs[numT - k]

# Xの降順で処理する
anss = [0] * Q
k = 1
for X, iX in sorted(Xs, reverse=True):
    # [k枚以下]になる最小のkを求める
    while not check(X, k):
        k += 1
    anss[iX] = scores[k]

print('\n'.join(map(str, anss)))
A,B=map(int,input())
if (B-1)/(A-1)==(B-1)//(A-1):
	print((B-1)/(A-1))
else:
	ptint((B-1)//(A-1)+1)

### FIXED CODE ###

A, B=map(int, input().split())
a=(B-1)/(A-1)
b=(B-1)//(A-1)
if a==b:
    print(b)
else:
	print(b+1)
N, M = map(int, input().split())
A = list(map(int, input().split()))


total_votes_checker = lambda M, total_votes: (False 
                                        if total_votes <= 1 / (4 * M) 
                                        else True)

total_votes = sum(A)
A_iter = iter(A)

acceptable_A = list(filter(lambda A_item: total_votes_checker(A_item, total_votes), A))
    
print(acceptable_A)


# acceptable_A = list(filter(total_votes_checker(next(A_iter),total_votes), A))

#item_num_checker = lambda N, A: True if len(A) == N else False

print(max(A),A[M])
popular_checker = lambda A, M: True if A[M] == max(A) else False

print(popular_checker(acceptable_A,M))

TF = popular_checker(acceptable_A,M)

printer = lambda TF : print("Yes") if TF else print("No")

printer(TF)

### FIXED CODE ###

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

total_votes = sum(A)

total_votes_checker = lambda M, i, total_votes: (False if i < (1 / (4 * M)) * total_votes else True)

A = list(filter(lambda i: total_votes_checker(M, i, total_votes), A))

print("Yes") if len(A) >= M else print("No")
n= list(input())
print('No' if 'L' in n[::2] or 'R' in n[1::2] else 'Yes)


### FIXED CODE ###

S = list(input())
print('No' if 'L' in S[::2] or 'R' in S[1::2] else 'Yes')
#include <iostream>
#include <string>

using namespace std;

int main () {
    string S,T;
        cin >> S >> T;
        char X=T[T.length()-1];
        if (S+X==T){
            cout<<"Yes";
        }
        else
            cout<<"No";
    // enter your code here

    return 0;
}


### FIXED CODE ###

S=input()
T=input()
if T==S+T[-1]:
    print("Yes")
else:
    print("No")
S = str(input())
l = list(S)
s = int(len(S))

num = 0
for i in range(s):
    if l[i] == l[i+1]:
        num += 1
    else:
        num += 0

if num == 0:
    print("Good")
else:
    print("Bad")

### FIXED CODE ###

S = str(input())
l = list(S)

for i in range(len(S)-1):
    if l[i] == l[i+1]:
        print("Bad")
        break
else:
     print("Good")
import itertools
N,M,Q=map(int,input().split())
L=[]
for q in range(Q):
    L.append(list(map(int,input().split())))

A = itertools.combinations([q for q in range(1,(M+1))], N)
count=[]
for a in A:
    tmp=0
    for l in L:
        if a[l[1]-1] - a[l[0]-1] == l[2]:
            tmp+=l[3]
        else:
            pass
    count.append(tmp)

print(max(count))


### FIXED CODE ###

import itertools
N,M,Q=map(int,input().split())
L=[]
for q in range(Q):
    L.append(list(map(int,input().split())))

A = itertools.combinations_with_replacement([q for q in range(1,(M+1))], N)
count=[]
for a in A:
    tmp=0
    for l in L:
        
        if a[l[1]-1] - a[l[0]-1] == l[2]:
            tmp+=l[3]
    count.append(tmp)

print(max(count))
a, b, c = map(int(input().split()))
print("Yes" if a <= c <= b else "No")

### FIXED CODE ###

a, b, c = map(int, input().split())
print("Yes" if a <= c <= b else "No")
x=input()
y= input()
z= input()

print(z x y)

### FIXED CODE ###

x,y,z=map(int,input().split())
print(z,x,y)
N = int(input())
H = list(map(int, input().split()))
ans = 0
max = H[1]
for i in range(N-1):
  if H[i+1] >= max:
    ans += 1
    max = H[i+1]
print(ans+1)

### FIXED CODE ###

N = int(input())
H = list(map(int, input().split()))
ans = 0
max = H[0]
for i in range(N-1):
  if H[i+1] >= max:
    ans += 1
    max = H[i+1]
print(ans+1)
S = input()

def count_common(a, b):
    min_char = set(min(a, b))
    max_char = set(max(a, b))
    return len(max_char) - len(max_char-min_char)

rtn = 0
for i in range(N):
    a = S[:i]
    b = S[i:]
    tmp = count_common(a, b)
    if rtn < tmp:
        rtn = tmp

print(rtn)

### FIXED CODE ###

N = int(input())
S = input()

def count_common(a, b):
    min_char = set(min(a, b))
    max_char = set(max(a, b))
    return len(max_char) - len(max_char - min_char)

rtn = 0
for i in range(N):
    a = S[:i]
    b = S[i:]
    tmp = count_common(a, b)
    if rtn < tmp:
        rtn = tmp

print(rtn)
s = list(input())
if s[0] != a[1] and s[1] != s[2] and s[2] != s[0]:
  print('Yes')
else:
  print('No')

### FIXED CODE ###

s = str(input())
a = s.count('a')
b = s.count('b')
c = s.count('c')
if a == b == c == 1:
  print('Yes')
else:
  print('No')
a = map(int, input())
a.sort()
maped_list = map(str, a)
mojiretu = ','.join(maped_list)    
print(mojiretu)



### FIXED CODE ###

xs = sorted(list(map(int, input().split())))
print(' '.join(map(str, xs)))
s = int(input())
red = [None]*s
red[0]= 0
red[1]= 0
red[2]= 0

for x in range(3,s):
    red[x] = (red[x-1] + red[x-3] + 1) % 1000000007
    
print((red[s-3]+1) % 1000000007)

### FIXED CODE ###

s = int(input())

if s >= 3:
    red = [None]*s
    red[0]= 0
    red[1]= 0
    red[2]= 0
    for x in range(3,s):
        red[x] = (red[x-1] + red[x-3] + 1) % 1000000007
    print((red[s-3]+1) % 1000000007)

else:
    print(0)
n = list(input())
a = 0
for i in n:
  a +=int(i)
  
if a%9==0:
  print('Yes')
else:
  print('No')

### FIXED CODE ###

m,n,k = map(int,input().split())
if m%n == 0:
  print(int(k*((m//n))))
elif m%n !=0:
  print(int(k*((m//n)+1)))
import numpy as np
H,W,K=map(int, input().split())
M=np.array([list(input()) for _ in range(H)])
ans=np.zeros((H,W),int)
k=0

for i in range(H):
    l=0
    for j in range(W):
        if M[i,j]=='#':
            k+=1
            ans[i,l:j+1]=k
            l=j+1

# for i in range(H):
#     if sum(ans[i,:])==0:
#         if i!=0:
#             ans[i,:]=ans[i-1,:]
#         if i==0:
#             ans[i,:]=ans[1,:]
            
for i in range(H):
    for j in range(W):
        if ans[i,j]==0:
            ans[i,j]=ans[i,j-1]
            
            
for j in range(W):
    J=W-j-1
    for i in range(H):
        I=H-i-1
        if ans[J,I]==0:
            ans[J,I]=ans[J+1,I]
            
for row in ans:
    print(*row)

### FIXED CODE ###

import numpy as np
H,W,K=map(int, input().split())
M=np.array([list(input()) for _ in range(H)])
ans=np.zeros((H,W),int)
k=0

for i in range(H):
    l=0
    for j in range(W):
        if M[i,j]=='#':
            k+=1
            ans[i,l:j+1]=k
            l=j+1

            
for i in range(H):
    for j in range(W):
        if ans[i,j]==0:
            ans[i,j]=ans[i,j-1]
            
            
for j in range(W):
    J=W-j-1
    for i in range(H):
        I=H-i-1
        if I!=H-1 and ans[I,J]==0:
            ans[I,J]=ans[I+1,J]


for i in range(H):
    if sum(ans[i,:])==0:
        if i!=0:
            ans[i,:]=ans[i-1,:]
        if i==0:
            ans[i,:]=ans[1,:]
            
for row in ans:
    print(*row)
s=input()
t=input()
anses=[]
for i in range(0,len(s)-len(t),1):
    cnt=0
    for j in range(len(t)):
        if s[i+j]==t[j]:
            cnt+=1
    anses.append(cnt)
print(len(t)-max(anses))

### FIXED CODE ###

s=input()
t=input()
anses=[]
for i in range(0,len(s)-len(t)+1,1):
    cnt=0
    for j in range(len(t)):
        if s[i+j]==t[j]:
            cnt+=1
    anses.append(cnt)
print(len(t)-max(anses))
n,k = map(int,input().split())
h = list(map(int,input().split()))
dp = [float("inf")]*n
dp[0] = 0
for i in range(n):
  for j in range(1,k+1):
    if i+j < n:
      dp[i+j] = min(dp[i]+abs(h[i+j]-h[i]),dp[i+j])
print(dp[-1])

### FIXED CODE ###

n = int(input())
h = list(map(int,input().split()))
dp = [float("inf")]*n
dp[0] = 0
for i in range(n):
  if i+1 < n:
    dp[i+1] = min(dp[i]+abs(h[i+1]-h[i]),dp[i+1])
  if i+2 < n:
    dp[i+2] = min(dp[i]+abs(h[i+2]-h[i]),dp[i+2])
print(dp[-1])
#input 2 integers K and X
K,X = (int(x) for x in input().split())

#define answer vaiable
ans = []
for x in range(X-(K-1), X+(K-1))
	ans.append(x)

#display ans
print(ans)

### FIXED CODE ###

#input 2 integers K and X
K,X = (int(x) for x in input().split())

#define answer vaiable
for x in range(X-(K-1), X+K):
    print(x, end=' ')
N,K=map(int,input().split())

if N==K:
  print(0)

elif N<K:
  lis1=[N,abs(N-K)]
  print(min(lis))
  
else:
  lis2=[N%K,abs(N%K-K)]
  print(min(lis2))
  

### FIXED CODE ###

N,K=map(int,input().split())

if N==K:
  print(0)

elif N<K:
  lis1=[N,abs(N-K)]
  print(min(lis1))
  
else:
  lis2=[N%K,abs(N%K-K)]
  print(min(lis2))
x = input().rstrip()
print(x**3)

### FIXED CODE ###

x = int(input())
print(x**3)
a1 = int(input())
a2 - int(input())
a3 = int(input())

x = a1 + a2 + a3

if x >= 22 :
  print("bust")
  
else :
  print("win")

### FIXED CODE ###

a1, a2, a3 = map(int,input().split())
 
x = a1 + a2 + a3
 
if x >= 22 :
  print("bust")
  
else :
  print("win")