Harryxun/stf_run huggingface dataset:
N=int(input())
M=int(input())
number=0
for i in range(N):
  v=int(input())
  if v < 1/(4*M):
    number=number
  else:
    number = number+1
if number >= M:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

N,M=input().split()
N,M=[int(N),int(M)]
 
a = list(map(int,input().strip().split()))[:N]
  
number=0
total=0
for i in range(N):
  v=a[i]
  total=total+v
for i in range(N):
  v=a[i]
  if v < (1/(4*M))*total:
    number=number
  else:
    number = number+1
if number >= M:
  print("Yes")
else:
  print("No")
n,m,c = map(int,input().split())
b = list(map(int,input().split()))
count = 0
for i in range(n):
    a = list(map(int,input().split()))
    eq = c
    for j in range(m):
        eq += a[i] * b[i]
    if eq > 0:
        count += 1
print(count)

### FIXED CODE ###

n,m,c = map(int,input().split())
b = list(map(int,input().split()))
count = 0
for i in range(n):
    a = list(map(int,input().split()))
    eq = c
    for j in range(m):
        eq += a[j] * b[j]
    if eq > 0:
        count += 1
print(count)
import copy
from collections import deque

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


def check(tup):
    global H
    global W
    global S

    tup_x=tup[0]
    tup_y=tup[1]
    if 0<=tup_x<H and 0<=tup_y<W:
        if S[tup_x][tup_y]=='.':
            return True
    else:
        return False

def neighbor(tup):
    x=tup[0]
    y=tup[1]
    cand=[(x-1,y),(x+1,y),(x,y-1),(x,y+1)]
    List=[]
    for c in cand:
        if check(c):
            List.append(c)
    return List

def bfs(start):#startはtuple型
    global H
    global W

    deq=deque()#as queue
    Dict=[]
    component=[]
    for i in range(W):
        component.append(-1)
    for j in range(H):
        Dict.append(copy.copy(component))

    deq.append(start)
    Dict[start[0]][start[1]]=0
    while deq:
        now=deq.popleft()
        nexts=neighbor(now)
        for next in nexts:
            next_x=next[0]
            next_y=next[1]
            if Dict[next_x][next_y]>=0:
                continue
            if next in deq:
                continue
            deq.append(next)
            Dict[next_x][next_y]=Dict[now[0]][now[1]]+1

    M=[]
    for d in Dict:
        M.apeend(max(d))
    return max(M)

Ans=[]
for k in range(H):
    for l in range(W):
        Ans.append(bfs((k,l)))

print(max(Ans))




### FIXED CODE ###

import copy
from collections import deque

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


def check(tup):
    global H
    global W
    global S

    tup_x=tup[0]
    tup_y=tup[1]
    if 0<=tup_x<H and 0<=tup_y<W:
        if S[tup_x][tup_y]=='.':
            return True
    else:
        return False

def neighbor(tup):
    x=tup[0]
    y=tup[1]
    cand=[(x-1,y),(x+1,y),(x,y-1),(x,y+1)]
    List=[]
    for c in cand:
        if check(c):
            List.append(c)
    return List

def bfs(start):#startはtuple型
    global H
    global W

    if check(start):
        deq=deque()#as queue
        Dict=[]
        component=[]
        for i in range(W):
            component.append(-1)
        for j in range(H):
            Dict.append(copy.copy(component))

        deq.append(start)
        Dict[start[0]][start[1]]=0
        while deq:
            now=deq.popleft()
            nexts=neighbor(now)
            for next in nexts:
                next_x=next[0]
                next_y=next[1]
                if Dict[next_x][next_y]>=0:
                    continue
                if next in deq:
                    continue
                deq.append(next)
                Dict[next_x][next_y]=Dict[now[0]][now[1]]+1

        M=[]
        for d in Dict:
            M.append(max(d))
        return max(M)
    
    else:
        return 0

Ans=[]
for k in range(H):
    for l in range(W):
        Ans.append(bfs((k,l)))

print(max(Ans))
from numpy import*;from scipy.sparse import*;(n,m),*p=[map(int,o.split())for o in open(0)];e,*f=array([(i,j+n-1,1)for i,q in enumerate(p)for j in list(q)[1:]]).T[:3];print("YNEOS"[1in csgraph.connected_components(csr_matrix(((f,e)),[n+m]*2))[1][:n]::2])

### FIXED CODE ###

from numpy import*
from scipy.sparse import*
(n,m),*p=[map(int,o.split())for o in open(0)]
e=array([(i,j+n-1,1)for i,q in enumerate(p)for j in list(q)[1:]]).T
print("NO"if 1 in csgraph.connected_components(csr_matrix(((e[2],e[:2])),[n+m]*2))[1][:n]else"YES")
A,B = map(int,input().split())
print(max(A+B,A-B,A*B)


### FIXED CODE ###

A,B = map(int,input().split())
print(max(A+B,A-B,A*B))
#!/usr/bin/env python3
import sys

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)
    # divisors.sort()
    return divisors

def lef(a, b):
    return a*a*a*a + a*a*a*b + a*a*b*b + a*b*b*b + b*b*b*b

def solve(X: int):
    divs = make_divisors(X)
    for d in divs:
        base = 0
        upper = X // d
        while(lef(base+d,base) < upper):
            base+=1
        if lef(base+d,base) == upper:
            print(base+d,base)
            return

        base = -d//2-1
        while(lef(base+d,base) < upper) and (base > d//2-1):
            base -= 1
        if lef(base+d, base) == upper:
            print(base+d, base)
            return

        base = -d
        while(lef(base+d,base) < upper) and (base < -d//2+1):
            base += 1
        if lef(base+d, base) == upper:
            print(base+d, base)
            return

        base = -d
        while(lef(base+d,base) < upper):
            base -= 1
        if lef(base+d, base) == upper:
            print(base+d, base)
            return
    raise
    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():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    X = int(next(tokens))  # type: int
    solve(X)

if __name__ == '__main__':
    main()


### FIXED CODE ###

#!/usr/bin/env python3
import sys

def solve(X: int):

    for i in range(-150, 150):
        for j in range(-150, 150):
            if j**5 - i**5 == X:
                print(j, i)
                return
    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():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    X = int(next(tokens))  # type: int
    solve(X)

if __name__ == '__main__':
    main()
n,x=map(int,input().split())
l=[int(i) for i in input()split()]
a=0
ans=0
for i in l:
  if a+i>x:
    print(ans+1)
    exit()
  ans+=1
  a+=i
print(ans)

### FIXED CODE ###

n,x=map(int,input().split())
l=[int(i) for i in input().split()]
d=0
ans=0
for i in l:
  if d+i>x:
    print(ans+1)
    exit()
  ans+=1
  d+=i
print(ans+1)
s= input()
if s[0]=='Y' and  s[1]=='A' and s[2]=='K' and s[3]=='I':
    print("Yes");
else:
    print("No")

### FIXED CODE ###

s= input()
if len(s)>3 and s[0]=='Y' and  s[1]=='A' and s[2]=='K' and s[3]=='I':
    print("Yes")
else:
    print("No")
def main():
    A, B = map(int, input().split())

    price = B if B >= 13 else B/2 if B >= 6 else 0

    return price 


if __name__ == '__main__'
    print(main())

### FIXED CODE ###

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

price = (int)(
    B   if A >= 13 else
    B/2 if A >= 6 else
    0)

print(price)
H, W = map(int,input().split())
S = []
for _ in range(H):
    S.append(input())

ans = [[0 for _ in range(W)] for _ in range(H)]
for i in range(H):
    for j in range(W):
        if S[i][j] == "#":
            ans[i][j] = "#"
            if j-1 >= 0 and ans[i][j-1] != "#":
                ans[i][j-1] += 1
            if j-1 >= 0 and i-1 >= 0 and ans[i-1][j-1] != "#":
                ans[i-1][j-1] += 1
            if j-1 >= 0 and i+1 <= H-1 and ans[i+1][j-1] != "#":
                ans[i+1][j-1] += 1

            if i-1 >= 0 and ans[i-1][j] != "#":
                ans[i-1][j] += 1
            if i+1 <= H-1 and ans[i+1][j] != "#":
                ans[i+1][j] += 1
            
            if j+1 <= W-1 and ans[i][j+1] != "#":
                ans[i][j+1] += 1
            if j+1 <= W-1 and i-1 >= 0 and ans[i-1][j+1] != "#":
                ans[i-1][j+1] += 1
            if j+1 <= W-1 and i+1 <= H-1 and ans[i+1][j+1] != "#":
                ans[i+1][j+1] += 1                        

for i in range(H):
    print(''.join(ans[i]))

### FIXED CODE ###

H, W = map(int,input().split())
S = []
for _ in range(H):
    S.append(input())

ans = [[0 for _ in range(W)] for _ in range(H)]
for i in range(H):
    for j in range(W):
        if S[i][j] == "#":
            ans[i][j] = "#"
            if j-1 >= 0 and ans[i][j-1] != "#":
                ans[i][j-1] += 1
            if j-1 >= 0 and i-1 >= 0 and ans[i-1][j-1] != "#":
                ans[i-1][j-1] += 1
            if j-1 >= 0 and i+1 <= H-1 and ans[i+1][j-1] != "#":
                ans[i+1][j-1] += 1

            if i-1 >= 0 and ans[i-1][j] != "#":
                ans[i-1][j] += 1
            if i+1 <= H-1 and ans[i+1][j] != "#":
                ans[i+1][j] += 1
            
            if j+1 <= W-1 and ans[i][j+1] != "#":
                ans[i][j+1] += 1
            if j+1 <= W-1 and i-1 >= 0 and ans[i-1][j+1] != "#":
                ans[i-1][j+1] += 1
            if j+1 <= W-1 and i+1 <= H-1 and ans[i+1][j+1] != "#":
                ans[i+1][j+1] += 1                        

for i in range(H):
    print(''.join(map(str,ans[i])))
N,K = map(int,input().split())
d = int(input())
A = [list(map(int,input().split())) for _ in range(N)]
print(N-d)

### FIXED CODE ###

N,K = map(int,input().split())
res = [0] * N
for i in range(K):
    d = int(input())
    A = list(map(int,input().split()))
    for j in A:
        res[j-1] +=1
print(res.count(0))
#coding:utf-8
import copy
N, K = map(int,input().split())
T = []
D = []
ls_td = []
for n in range(N):
    t, d = map(int,input().split())
    ls_td.append([t,d])
ls_td = sorted(ls_td, key=lambda x: x[1])[::-1]
head = ls_td[:K]
tail = ls_td[K:]
def get_set(mat):
    st = set()
    for t,d in mat:
        st.add(t)
    return st
def score(mat):
    r = 0
    ls_t = set()
    for t,d in mat:
        ls_t.add(t)
        r += d
    r += len(ls_t)**2
    return r

def search_del(mat):
    idx = -1
    st = set()
    for i,(t,d) in enumerate(mat):
        if t in st:
            idx = i
        st.add(t)
    return idx
st = get_set(head)
current_score = score(head)
idx = search_del(head)
for t,d in tail:
    if idx == -1:
        break

    if t in st:
        pass
    else:
        new = copy.deepcopy(head)
        new[idx] = t,d
        candidate_score = score(new)
        if current_score < candidate_score:
            head = new
            st.add(t)
            current_score = candidate_score
            idx = search_del(head)
print (current_score) 
        


### FIXED CODE ###

#coding:utf-8
a,b,c = map(int,input().split())
s = (a+b+c)/2.0
S = (s * (s-a) * (s-b) * (s-c)) ** 0.5
print (int(S))
import math
num=input()
a,b=int(num.split())

if a!=2 and b!=2:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

import math
num=input().split()
a=int(num[0])
b=int(num[1])

if a!=2 and b!=2:
    print("Yes")
else:
    print("No")
# Sunny -> Cloudy -> Rainy -> Sunny ...
# 標準入力NはSunny Cloudy Rainyのいずれか

N = input()

if N == "Sunny":
    print("Cloudy"):
elif N == "Cloudy":
    print("Rainy"):
elif N == "Rainy":
    print("Sunny")

### FIXED CODE ###

# Sunny -> Cloudy -> Rainy -> Sunny ...
# 標準入力はSunny Cloudy Rainyのいずれか

S = input()

if S == "Sunny":
    print("Cloudy")
elif S == "Cloudy":
    print("Rainy")
elif S == "Rainy":
    print("Sunny")
from __future__ import print_function


class Solution:
    """
    @param prices: Given an integer array
    @return: Maximum profit
    """

    @staticmethod
    def insertion_sort():
        # write your code here
        array_length = int(raw_input())
        unsorted_array = map(int, raw_input().line.strip().split(" "))

        for i in range(1, array_length):
            v = unsorted_array[i]
            j = i - 1
            while j >= 0 and unsorted_array[j] > v:
                unsorted_array[j + 1] = unsorted_array[j]
                j -= 1
            unsorted_array[j + 1] = v
            print(" ".join(str(i) for i in unsorted_array))


if __name__ == '__main__':
    solution = Solution()
    solution.insertion_sort()

### FIXED CODE ###

#!/usr/bin/env python
# encoding: utf-8

from __future__ import print_function


class Solution:
    """
    @param prices: Given an integer array
    @return: Maximum profit
    """

    @staticmethod
    def insertion_sort():
        # write your code here
        array_length = int(input())
        unsorted_array = [int(x) for x in input().split()]

        for i in range(array_length):
            v = unsorted_array[i]
            j = i - 1
            while j >= 0 and unsorted_array[j] > v:
                unsorted_array[j + 1] = unsorted_array[j]
                j -= 1
            unsorted_array[j + 1] = v
            print(" ".join(map(str, unsorted_array)))


if __name__ == '__main__':
    solution = Solution()
    solution.insertion_sort()
from functools import reduce
from math import gcd

N = int(input())
A = [int(a) for a in input().split(" ")]
if N==2:
    print(gcd(*A))
    exit()

left = reduce(lambda acc, x: acc+[gcd(x, acc[-1])], A, A[:1])
right = reduce(lambda acc, x: acc+[gcd(x, acc[-1])], A[::-1], A[-1:])[::-1]

ans = max([gcd(left[i-1], right[i+1]) for i in range(1,N-1)])
ans = max([right[1], ans, left[-2]])
print(ans)


### FIXED CODE ###

from functools import reduce
from fractions import gcd

N = int(input())
A = [int(a) for a in input().split(" ")]
if N==2:
    print(max(A))
else:
    left, right = [-1]*(N-1), [-1]*(N-1)
    lacc, racc = (A[0], A[-1])
    for i in range(N-1):
        lacc, racc = gcd(lacc, A[i]), gcd(racc, A[N-1-i])
        left[i], right[i] = lacc, racc
    ans = max(right[-1], left[-1])
    for l, r in zip(left[:-1], reversed(right[:-1])):
        ans = max(ans, gcd(l,r))
    print(ans)
import numpy as np
import math
import sys
import bisect
sys.setrecursionlimit(10000000)

def main():
    s = input()
    t = input()
    alphabets = dict.fromkeys(list("abcdefghijklmnopqrstuvwxyz"), None)
    # alphabets = alphabet.copy()
    for key_ in alphabets:
        lists = []
        for i in range(len(s)):
            if key_ == s[i]:
                lists.append(i)
        alphabets[key_] = lists
    # print(alphabets)
    now = -1
    count = 0
    for alpha in t:
        if alphabets[alpha] is None:
            print(-1)
            sys.exit()
        else:
            lists = alphabets[alpha]
            index = bisect.bisect_left(lists, now)
            if index >= len(lists):
                now = -1
                count += len(s)
                index = bisect.bisect_left(lists, now)
                now = lists[index]
            else:
                now = lists[index]
            # print(now, count)
    print(count + now + 1)
            







if __name__ == '__main__':
    main()

### FIXED CODE ###

import numpy as np
import math
import sys
import bisect
sys.setrecursionlimit(10000000)

def main():
    s = input()
    t = input()
    alphabets = dict.fromkeys(list("abcdefghijklmnopqrstuvwxyz"), None)
    # alphabets = alphabet.copy()
    for key_ in alphabets:
        lists = []
        for i in range(len(s)):
            if key_ == s[i]:
                lists.append(i)
        alphabets[key_] = lists
    now = -1
    count = 0
    for alpha in t:
        if len(alphabets[alpha]) == 0:
            print(-1)
            sys.exit()
        else:
            lists = alphabets[alpha]
            index = bisect.bisect_right(lists, now)
            if index >= len(lists):
                now = -1
                count += len(s)
                now = lists[0]
            else:
                now = lists[index]
            # print(now, count)
    print(count + now + 1)
            







if __name__ == '__main__':
    main()
def dp(k, value):
    if k==n:
        if value==0:
            return 1
        else:
            return 0
    if memo[k][value]>=0:
        return memo[k][value]
    memo[k][value]=dp(k+1, value+x[k])+dp(k+1, value)
    return memo[k][value]
print(dp(0, 0)-1)

### FIXED CODE ###

n, a = map(int, input().split())
x=list(map(lambda x: int(x)-a, input().split()))
k=[[0]*3000 for i in range(60)]
for i in range(3000):
    k[0][i]=0
k[0][x[0]+1500]+=1
k[0][1500]+=1
for i in range(1, n):
    for j in range(3000):
        if 3000>j-x[i]>=0:
            k[i][j]=k[i-1][j-x[i]]+k[i-1][j]
        else:
            k[i][j]=k[i-1][j]
print(k[n-1][1500]-1)
#!/usr/bin/env python3

"""
Lの文字列N個(s1-sN)
N個の文字列を辞書順にしたあと，くっつけて出力する
"""


def main():
    l, n = map(int, input().split())
    input_list = []

    for i in range(n):
        input_list.append(input().strip())

    result_list = sorted(input_list)
    print("".join(result_list))


if __name__ == "__main__":
    main()


### FIXED CODE ###

#!/usr/bin/env python3

"""
Lの文字列N個(s1-sN)
N個の文字列を辞書順にしたあと，くっつけて出力する
"""


def main():
    n, l = map(int, input().split())
    input_list = []

    for i in range(n):
        input_list.append(input())

    result_list = sorted(input_list)
    print("".join(result_list))


if __name__ == "__main__":
    main()
N,M = map(int,input().split())

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

qtd_votos = sum(votos)

minimo = qtd_votos/(4*M)

votos.sort(reverse = True)

if votos[M-1] >= minimo:
    print("Yes")
else:
    print("No")
トすることで判定できます。

### FIXED CODE ###

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

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

qtd_votos = sum(votos)

minimo = qtd_votos/(4*M)

votos.sort(reverse = True)

if votos[M-1] >= minimo:
    print("Yes")
else:
    print("No")
n = int(input())
A = []
X = []
for i in range(n):
    a = int(input())
    A.append(a)
    lis = []
    for j in range(a):
        lis.append(list(map(int, input().split())))
    X.append(lis)

ans = 0
for i in range(2 ** n):
    H_lis = [0 for i in range(n)]
    for j in range(n):
        if ((i >> j) & 1):
            H_lis[j] = 1
    flag = True
    j = 0
    while j < n and flag:
        if H_lis[j] == 1:
            for k in range(A[k]):
                if X[j][k][1] != H_lis[X[j][k][0] - 1]:
                    flag = False
                    break
        j += 1
    if flag:
        ans = max(ans, H_lis.count(1))
print(ans)

### FIXED CODE ###

n = int(input())
A = []
X = []
for i in range(n):
    a = int(input())
    A.append(a)
    lis = []
    for j in range(a):
        lis.append(list(map(int, input().split())))
    X.append(lis)

ans = 0
for i in range(2 ** n):
    H_lis = [0 for i in range(n)]
    for j in range(n):
        if ((i >> j) & 1):
            H_lis[j] = 1
    flag = True
    j = 0
    while j < n and flag:
        if H_lis[j] == 1:
            for k in range(A[j]):
                if X[j][k][1] != H_lis[X[j][k][0] - 1]:
                    flag = False
                    break
        j += 1
    if flag:
        ans = max(ans, H_lis.count(1))
print(ans)
# -*- coding: utf-8 -*-
n, k = map(int, input().split())

sunuke_list = [False for i in range(n)]

for i in range(k):
    d = int(input())
    has_sunuke_list = input().split()
    for k in has_sunuke_list:
        sunuke_list[int(k)-1] = True

print(sunuke_list.coutn(False))


### FIXED CODE ###

# -*- coding: utf-8 -*-
n, k = map(int, input().split())

sunuke_list = [False for i in range(n)]

for i in range(k):
    d = int(input())
    has_sunuke_list = input().split()
    for k in has_sunuke_list:
        sunuke_list[int(k)-1] = True

print(sunuke_list.count(False))
H, W = map(int, input().split())
board = [list(input()) for i in range(H)]

ans = board
dist = [(1, 1), (1, 0), (1, -1), (0, -1), (-1, -1), (-1, 0), (-1, 1), (0, 1)]

for i in range(H):
    for j in range(W):
        if board[i][j] == '#':
            continue
        count = 0
        for x, y in dist:
            now_x = i + x
            now_y = j + y
            if now_x >= W or now_x < 0 or now_y >= H or now_y < 0:
                continue
            if board[now_x][now_y] == '#':
                count += 1
        ans[i][j] = str(count)

for line in ans:
    print(''.join(line))


### FIXED CODE ###

import sys
def main():
    in1 = input()
    nums, length = in1.split(' ')
    nums= int(nums)
    length = int(length)
    bombs = []

    for i in range(nums):

        bombs.append(input())
    checked = [['']*length for i in range(nums)]
    for i in range(nums):
        for j in range(length):
            if bombs[i][j] == '#':
                checked[i][j] = '#'
            else:
                bombnum = 0
                if i != 0:
                    if j != 0:
                        if bombs[i-1][j-1] == '#':
                            bombnum += 1

                    if j != length -1:
                        if bombs[i-1][j+1] == '#':
                            bombnum += 1

                    if bombs[i-1][j] == '#':
                        bombnum += 1


                if j != 0:
                    if bombs[i][j-1] == '#':
                        bombnum += 1

                if j != length-1:
                    if bombs[i][j+1] == '#':
                        bombnum += 1


                if i != nums-1:
                    if j != 0:
                        if bombs[i+1][j-1] == '#':
                            bombnum += 1

                    if j != length -1:
                        if bombs[i+1][j+1] == '#':
                            bombnum += 1

                    if bombs[i+1][j] == '#':
                        bombnum += 1

                checked[i][j] = bombnum
    for i in checked:
        for j in i:
            print(j, end = '')
        print('')
if __name__ == '__main__':
    main()
import fractions
from functools import reduce
def main():
    N, X = map(int, input().split())
    x = list(map(int, input().split()))
    x.sort()
    l = []
    for i in range(N-1):
        l.append(x[i+1]-x[i])
    print(reduce(fractions.gcd, l))
main()


### FIXED CODE ###

import fractions
from functools import reduce
def main():
    N, X = map(int, input().split())
    x = list(map(int, input().split()))
    x.append(X)
    x.sort()
    l = []
    for i in range(N):
        l.append(x[i+1]-x[i])
    print(reduce(fractions.gcd, l))
main()
N,M=map(int,input().split())
num={1:2,2:5,3:5,4:4,5:5,6:6,7:3,8:7,9:6}
A=list(map(int,input().split()))
A.sort(reverse = True)
dp = [0]+[-1]*(N+1)
for i in range(N):
    for j in A:
        if i+num[j]<=N:
            dp[i+num[j]] = max(dp[i+num[j]],dp[i]+1)
ans = []
m=N
while m>0:
    for i in A:
        if m-num[i]>=0 and dp[m-num[i]==dp[m]-1:
            m-=num[i]
            ans.append(str(i))
            break
print("".join(ans))

### FIXED CODE ###

N,M=map(int,input().split())
num={1:2,2:5,3:5,4:4,5:5,6:6,7:3,8:7,9:6}
A=list(map(int,input().split()))
A.sort(reverse = True)
dp = [0]+[-1]*(N+1)
for i in range(N):
    for j in A:
        if i+num[j]<=N:
            dp[i+num[j]] = max(dp[i+num[j]],dp[i]+1)
ans = []
m=N
while m>0:
    for i in A:
        if m-num[i]>=0 and dp[m-num[i]]==dp[m]-1:
          m-=num[i]
          ans.append(str(i))
          break
print("".join(ans))
from math import factorial as fa
n,k = map(int,input().split())
for i in range(1,k+1):
    r_tmp = fa(n-k+1) / (fa(i) * fa(n-k+1-i))
    b_tmp = fa(k-1) / (fa(i-1) * fa(k-i))
    print(int(r_tmp * b_tmp) % (10**9+7))

### FIXED CODE ###

from math import factorial as fa
def con(a,b):
    if a < b:
        return 0
    elif a < 0:
        return 1
    else:
        return int(fa(a)) // int(fa(b) * fa(a-b))
    
n,k = map(int,input().split())
for i in range(1,k+1):
    r_tmp = con(n-k+1,i)
    b_tmp = con(k-1,i-1)
    if r_tmp:
        print((r_tmp * b_tmp) % (10**9+7))
    else:
        print(0)