Harryxun/stf_run huggingface dataset:
N, Y = [int(i) for input().split()]

ans = None

for i in range(N+1):
    for j in range(i+1):
        y = (N-i)*10000 + (i-j)*5000 + j*1000
        if y == Y:
            ans=(i, j)
            break
    if y == Y:
        break
        
if ans:
    answer = ' '.join(
        [str(N-ans[0]), str(ans[0]-ans[1]), 
         str(ans[1])])
else:
    answer = '-1 -1 -1'
    
print(answer)

### FIXED CODE ###

N, Y = [int(i) for i in input().split()]

ans = None

for i in range(N+1):
    for j in range(i+1):
        y = (N-i)*10000 + (i-j)*5000 + j*1000
        if y == Y:
            ans=(i, j)
            break
    if y == Y:
        break
        
if ans:
    answer = ' '.join(
        [str(N-ans[0]), str(ans[0]-ans[1]), 
         str(ans[1])])
else:
    answer = '-1 -1 -1'
    
print(answer)
A, B = list(map(int, input()))

if B % A == 0:
    print(A + B)
else:
    print(B - A)


### FIXED CODE ###

A, B = list(map(int,input().split()))
if B % A == 0:
  print( A + B )
else:
  print( B - A )
import sys

pi =3.141592653589

r = int(raw_input())

area = r * r * pi
length = 2 * r * pi

print str(area) + " " + str(length) + "\n"

sys.exit()

### FIXED CODE ###

import math
n = input()
S = '%.6f' % (float(n)**2 * math.pi)
L = '%.6f' % (float(n) * 2 * math.pi)
print "{} {}".format(S,L)
A,B,C = map(int, input().split())

#for i in range(1, 101):
mods = list()
while(True):
    #print("A * i = " + str(A * i) + ", mod = " + str((A * i) % B))
    mod = (A * i) % B
    if (mod == C):
        print("Yes")
        break
    elif(mod in mods):
        print("No")
        break
    else:
        mods.append(mod)

### FIXED CODE ###

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

#for i in range(1, 101):
mods = list()
i = 1
while(True):
    #print("A * i = " + str(A * i) + ", mod = " + str((A * i) % B))
    mod = (A * i) % B
    if (mod == C):
        print("YES")
        break
    elif(mod in mods):
        print("NO")
        break
    else:
        mods.append(mod)
    i += 1
s = input()
a = int(s)
mods = [a%2019]
for i in range(len(s)):
  a = int((a-int(s[-(i+1)]))10)
  mods.append(a%2019)
mod_N ={}
for i in mods:
  if not i in mod_N:
    mod_N[i] = 0
  else:
    mod_N[i] += 1
ans = 0
for i in mod_N:
  ans += int(i*(i-1)/2)
print(ans)

### FIXED CODE ###

s = input()
a = 0
mods = [0]*2019
mods[a] += 1
r = 1
for i in s[::-1]:
  a = (a+int(i)*r)%2019
  r = r*10%2019
  mods[a] += 1
ans = 0
for i in mods:
  ans += i*(i-1)//2
print(ans)
n=input()
if x==1:
  print(0)
  exit()
t=n-5
ans=1
ans+=t//11*2
if 0<(t%11)<7:
  ans+=1
elif t%11>6:
  ans+=2
print(ans)

### FIXED CODE ###

x=int(input())-1
ans=0
ans+=x//11*2
if x%11<6:
  ans+=1
elif x%11>5:
  ans+=2
print(ans)
N = int(input())
X = list(map(int,input().split()))
nX = sorted(X)
left = nX[N//2-1]
right = nX[N//2]
for i in X:
    if X <= left:
        print(right)
    else:
        print(left)

### FIXED CODE ###

N = int(input())
X = list(map(int,input().split()))
nX = sorted(X)
left = nX[N//2-1]
right = nX[N//2]
for i in X:
    if i <= left:
        print(right)
    else:
        print(left)
def unification(S: str) -> int:
    q = set([S])
    min_len = len(S)
    while len(q) > 0:
        t = []
        for s in q:
            min_len = len(s)
            for i, c in enumerate(s):
                if i + 1 < len(s) and c != s[i+1]:
                    t.append(s[:i] + s[i+2:])
        q = set(t)

    return len(S) - min_len


if __name__ == "__main__":
    S = input()
    answer = unification(S)
    print(answer)


### FIXED CODE ###

def unification(S: str) -> int:
    c0 = sum([int(c) for c in S])
    c1 = sum([1 - int(c) for c in S])

    return min(c0, c1) * 2


if __name__ == "__main__":
    S = input()
    answer = unification(S)
    print(answer)
n,m = map(int, input().split())
a_list = [int(a) for a in input().split()]
a_list.sort()
bc_list = [0 for _ in range(m)]
for i in range(m):
    b,c = map(int, input().split())
    bc_list[i] = [b,c]
bc_list.sort(key= lambda x:x[1],reverse=True)
cur = 0
for i in range(m):
    b,c = bc_list[i][0],bc_list[i][1]
    for j in range(b):
        if a_list[cur]>=c:
            break
        else:
            a_list[cur] = c
            cur += 1
    else:
        continue
    break
print(sum(a_list))

### FIXED CODE ###

n,m = map(int, input().split())
a_list = [int(a) for a in input().split()]
a_list.sort()
bc_list = [0 for _ in range(m)]
for i in range(m):
    b,c = map(int, input().split())
    bc_list[i] = [b,c]
bc_list.sort(key= lambda x:x[1],reverse=True)
cur = 0
for i in range(m):
    b,c = bc_list[i][0],bc_list[i][1]
    for j in range(b):
        if cur >= n:
            break
        if a_list[cur]>=c:
            break
        else:
            a_list[cur] = c
            cur += 1
    else:
        continue
    break
print(sum(a_list))
from collections import deque
X, Y, Z, K = map(int, input().split())
A = sorted(list(map(int, input().split())), reverse=True)
B = sorted(list(map(int, input().split())), reverse=True)
C = sorted(list(map(int, input().split())), reverse=True)

A.append(-int(1e+15))
B.append(-int(1e+15))
C.append(-int(1e+15))

Aq = deque(A)
Bq = deque(B)
Ar = [Aq.popleft()]
Br = [Bq.popleft()]
maximum = min((len(A)-1) * (len(B)-1), 3000)
preA = Ar[0]
preB = Br[0]

while len(Ar) + len(Br) < maximum:
    if  Ar[0] - Aq[0] > Br[0] - Bq[0]:
        Br.append(Bq.popleft())
        preB = Br[-1]
    else:
        Ar.append(Aq.popleft())
        preA = Ar[-1]

AB = [Ar[i] + Br[j] for i in range(len(Ar)) for j in range(len(Br))]
AB = sorted(AB, reverse=True)

AB.append(-int(1e+15))

ABq = deque(AB)
Cq = deque(C)
ABr = [ABq.popleft()]
Cr = [Cq.popleft()]
maximum = min((len(AB)-1) * (len(C)-1), 3000)
preAB = ABr[0]
preC = Cr[0]
while len(ABr) + len(Cr) < maximum:
    if ABr[0] - ABq[0] > Cr[0] - Cq[0]:
        Cr.append(Cq.popleft())
        preC = Cr[-1]
    else:
        ABr.append(ABq.popleft())
        preAB = ABr[-1]

ABC = [ABr[i] + C[j] for i in range(len(ABr)) for j in range(len(Cr))]
ABC = sorted(ABC, reverse=True)

for i in range(K):
    print(ABC[i])


### FIXED CODE ###

from collections import deque
X, Y, Z, K = map(int, input().split())
A = sorted(list(map(int, input().split())), reverse=True)
B = sorted(list(map(int, input().split())), reverse=True)
C = sorted(list(map(int, input().split())), reverse=True)

A.append(-int(1e+15))
B.append(-int(1e+15))
C.append(-int(1e+15))

Aq = deque(A)
Bq = deque(B)
Ar = [Aq.popleft()]
Br = [Bq.popleft()]
maximum = min((len(A)-1) + (len(B)-1), K+1)
preA = Ar[0]
preB = Br[0]

while len(Ar) + len(Br) < maximum:
    if  Ar[0] - Aq[0] > Br[0] - Bq[0]:
        Br.append(Bq.popleft())
        preB = Br[-1]
    else:
        Ar.append(Aq.popleft())
        preA = Ar[-1]

AB = [Ar[i] + Br[j] for i in range(len(Ar)) for j in range(len(Br))]
AB = sorted(AB, reverse=True)

AB.append(-int(1e+15))

ABq = deque(AB)
Cq = deque(C)
ABr = [ABq.popleft()]
Cr = [Cq.popleft()]
maximum = min((len(AB)-1) + (len(C)-1), K+1)
preAB = ABr[0]
preC = Cr[0]
while len(ABr) + len(Cr) < maximum:
    if ABr[0] - ABq[0] > Cr[0] - Cq[0]:
        Cr.append(Cq.popleft())
        preC = Cr[-1]
    else:
        ABr.append(ABq.popleft())
        preAB = ABr[-1]

ABC = [ABr[i] + Cr[j] for i in range(len(ABr)) for j in range(len(Cr))]
ABC = sorted(ABC, reverse=True)

for i in range(K):
    print(ABC[i])
n, x = (int(i) for i in input().split())
l_array = [int(i) for i in input().split()]

counter = 0
coordinate = 0

while counter < n+1 and coordinate<=x:
    counter+=1
    coordinate += l_array[counter-1]

print(counter)


### FIXED CODE ###

n, x = (int(i) for i in input().split())
l_array = [int(i) for i in input().split()]

counter = 0
coordinate = 0

while counter < n+1 and coordinate<=x:
    counter+=1
    if counter == n+1:
        break
    else:
        coordinate += l_array[counter-1]


print(counter)
n, t = map(int, input().split())
c_lists = []
t_lists = []
for i in range(n):
  c_i, t_i = map(int, input().split())
  c_lists.append(c_i)
  t_lists.append(t_i)

costs = []
for j in range(n):
    if t_lists[j] <= t:
        costs.append(c_lists[j])
if costs == []:
    ans = 'TLE'
else:
    minimum = costs[0]
    for k in costs:
        if k < minimum:
            minimum = k
            ans = k
print(ans)

### FIXED CODE ###

n, t = map(int, input().split())
c_lists = []
t_lists = []
for i in range(n):
  c_i, t_i = map(int, input().split())
  c_lists.append(c_i)
  t_lists.append(t_i)

costs = []
for j in range(n):
    if t_lists[j] <= t:
        costs.append(c_lists[j])
if not costs:
    ans = 'TLE'
else:
    costs.sort()
    ans = costs[0]
print(ans)
# coding: utf-8

K, M = (int(x) for x in input().split())

A = [int(x) for x in input().split()]

A = [x for x in set(A)]
A.sort()
A.reverse()

X = list(range(1, M + 1))

for a in A:
	X = [x for x in X if (x - int(a / 2)) % a == 0]

print(len(X))

### FIXED CODE ###

# coding: utf-8

import sys
import fractions
import functools

K, M = (int(x) for x in input().split())

A = [int(x) for x in input().split()]

A = [x for x in set(A)]
A.sort()

#print("A = " + str(A))#

# A[0]を素因数分解して2で割り切れる回数を数える
div = 0
a_0 = A[0]
while a_0 % 2 == 0:
	a_0 /= 2
	div += 1

#print("count = " + str(div))#

# Aのすべての整数がA[0]と同じ回数2で割り切れるか調べる
for i in range(1, len(A)):
	div2 = 0
	a = A[i]
	while a % 2 == 0:
		a /= 2
		div2 += 1
	#print("A[" + str(i) + "] count = " + str(div2))#
	if div2 != div:
		print("0")
		sys.exit()

# Aのすべての整数の最小公倍数を計算する
A = [a // 2 for a in A]
lcm = functools.reduce(lambda a, b: a * b // fractions.gcd(a, b), A, 1)
#print("lcm = " + str(lcm))#

# 1以上M以下の最小公倍数の奇数倍の整数の個数を数える
print(-(-(M // lcm) // 2))
#python3
def main():
    h = int(input())
    n = h//2 + 1
    s = ''.join(['1']*n) 
    ans = int(s, 2)
    print(ans)
main()


### FIXED CODE ###

#python3

def f(x):
    if x == 1:
        return 1
    else:
        return 2*f(x//2)+1

def main():
    h = int(input())
    print(f(h))

main()
a, b, n = map(int, input().split())
print(a * (b-1) // b))

### FIXED CODE ###

a, b, n = map(int, input().split())
print(a * min((b-1), n) // b)
=input()
if S=="BBB" or S=="AAA":
  print("No")
else:
  print('Yes')

### FIXED CODE ###

n=input()
if n[0]==n[1] and n[1]==n[2]:
  print("No")
else:
  print("Yes")
a = input().split(" ")

x = [int(a[0]),int(a[1])]
y = [int(a[2]),int(a[3])]

ans = []

for i in x:
  for j in y:
    s = i*j
    
    ans.append(s)
ans.sort(reverse = True)  
print(ans[0])
    


### FIXED CODE ###

n = int(input())

if n == 1:
  print(0)
elif n == 0:
  print(1)
word = raw_input()
for i in range(len(word)):
    if word[i] == '\n':
        n = word[:i - 1]
        word = word[i:]
        break
n = int(n)

max = 0
min = 0
num = range(n)
for i in range(n):
    for j in range(7):
        if word[j] == '\n':
            num[i] = word[:j - 1]
            num[i] = int(num[i])
            word = word[j:]
            break

dif = range(n - 1)
min = 0
for i in range(n):
    for j in range(i):
        if num[j] < min:
            min = num[j]
    dif[i] = num[i] - min
    if dif[i] > max:
        max = dif[i]

print max

### FIXED CODE ###

N = int(raw_input())
min = int(raw_input())
max = int(raw_input())
dif = max - min
if max < min:
    min = max

for i in range(N - 2):
    R = int(raw_input())
    if R - min > dif:
        dif = R - min
    if R < min:
        min = R

print dif
aa

### FIXED CODE ###

# coding: utf-8

import sys
input = sys.stdin.readline

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

print(max(A + B, (max(A, B) + max(A - 1, B - 1))))
class UnionFind:
    def __init__(self, n):
        self.par = [i for i in range(n+1)]
        self.rank = [0] * (n+1)

    def find(self, x):
        if self.par[x] == x:
            return x
        else:
            self.par[x] = self.find(self.par[x])
            return self.par[x]

    def same_check(self, x, y):
        return self.find(x) == self.find(y)

    def same_count(self, x):
        return self.par.count(self.find(x))

    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)

        if self.rank[x] < self.rank[y]:
            self.par[x] = y
        else:
            self.par[y] = x
            if self.rank[x] == self.rank[y]:
                self.rank[x] += 1

    def print_par(self):
        print(self.par)

txt = open("a.txt", "r")
n, m = [int(item) for item in input().split()]
e = [[int(item) for item in input().split()] for i in range(m)]
e = e[::-1]

UF = UnionFind(n)
unconvinience = n * (n-1) / 2
uc_list = [int(unconvinience)]

for item in e:
    if UF.same_check(item[0], item[1]):
        pass
    else:
        unconvinience -= (UF.same_count(item[0]) * UF.same_count(item[1]))

    uc_list.append(int(unconvinience))
    UF.union(item[0], item[1])

for i in range(m):
    print(uc_list[::-1][i+1])


### FIXED CODE ###

n, m = [int(item) for item in input().split()]
ab = [[int(item) for item in input().split()] for _ in range(m)]
ab.reverse()

class UnionFind:
    def __init__(self, n):
        self.par = [i for i in range(n)]
        self.rank = [0] * n
        self.size = [1] * n

    def find(self, x):
        if self.par[x] == x:
            return x
        else:
            self.par[x] = self.find(self.par[x])
            return self.par[x]
    
    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)

        if self.rank[x] < self.rank[y]:
            self.par[x] = y
            self.size[y] += self.size[x]
        else:
            self.par[y] = x
            self.size[x] += self.size[y]
            if self.rank[x] == self.rank[y]:
                self.rank[x] += 1
    
    def same_check(self, x, y):
        return self.find(x) == self.find(y)

    def get_size(self, x):
        return self.size[self.find(x)]

inconv = n*(n-1) // 2 
UF = UnionFind(n)

inconv_list = []
inconv_list.append(inconv)
for a, b in ab:
    if not UF.same_check(a-1, b-1):
        inconv -= UF.get_size(a-1) * UF.get_size(b-1)
        UF.union(a-1, b-1)
    inconv_list.append(inconv)
for item in inconv_list[::-1][1:]:
    print(item)
import java.util.Scanner;

public class Main{
  public static void main(String[] args){
    Scanner scan=new Scanner(System.in);
    int i=scan.nextInt();
    int j=scan.nextInt();
    if (i!=j){
      System.out.println("No");
    }else
      System.out.println("Yes");
    scan.close();
  }
}


### FIXED CODE ###

#a ac or wa
n,m=input().split()
ans="No"
if n==m:
    ans="Yes"
print(ans)
def main():
    n, m = map(int, input().split())
    num = [set() for _ in range(m)]
    ans = ""
    for _ in range(m):
        s, v = input().split()
        num[int(s)-1].add(v)
    if n > 1 and list(num[0])[0] == "0":
        print(-1)
        return
    for i in num[:-1]:
        if len(i) == 0:
            ans += "0"
        elif len(i) == 1:
            ans += list(i)[0]
        else:
            print(-1)
            return
    if len(num[-1]) > 1:
        print(-1)
        return
    if len(num[-1]) == 1:
        ans += list(num[-1])[0]
    else:
        if m == 1:
            ans += "0"
        else:
            ans += "1"
    print(ans)

if __name__ == "__main__":
    main()

### FIXED CODE ###

def main():
    n, m = map(int, input().split())
    ans = [None]*n
    for _ in range(m):
        s, c = map(int, input().split())
        try:
            if ans[s-1] is None:
                if c == 0 and s != n:
                    print("-1")
                    return
                ans[s-1] = c
            elif ans[s-1] != c:
                print("-1")
                return
        except:
            print("-1")
            return
    ans_str = ""
    p = ans.pop(0)
    if p is None:
        if n == 1:
            ans_str += "0"
        else:
            ans_str += "1"
    else:
        ans_str += str(p)
    if ans:
        for a in ans:
            ans_str += str(a) if a else "0"
    print(ans_str)


if __name__ == "__main__":
    main()
n=input()
m=set(n)
if len(m)==2 and n.count(m[0]):
    print("Yes")
else:
    print("No")

### FIXED CODE ###

n=input()
m=set(n)
if len(m)==2 and n.count(n[0])==2:
    print("Yes")
else:
    print("No")
import math

r = int(raw_input())
print "{:.6f} {:.6f}".format(math.pi * r * r, s * math.pi * r)

### FIXED CODE ###

import math

r = float(raw_input())
print "{:.6f} {:.6f}".format(math.pi * r * r, 2 * math.pi * r)
def read_line(*types): return [f(a) for a, f in zip(input().split(), types)]

n, q = read_line(int, int)
s, = read_line(str)

p = []
i = 0
while i < len(s) - 1:
    if s[i:i+2] == 'AC':
        p.append(i)
        i += 2
    else:
        i += 1

for i in range(q):
    l, r = read_line(int, int)
    l, r = l - 1, r - 1

    c = 0
    for j in range(len(p)):
        pp = p[j]
        if l <= pp:
            break
        c += 1

    for jj in range(len(p), j, -1):
        pp = p[j]
        if pp + 1 <= r:
            break
        c += 1

    print(len(p) - c)


### FIXED CODE ###

def read_line(*types): return [f(a) for a, f in zip(input().split(), types)]

n, q = read_line(int, int)
s, = read_line(str)

m = [0 for _ in range(len(s) + 1)]

c = 0
for i in range(len(s)):
    if s[i:i+2] == 'AC':
        c += 1
    m[i + 1] = c

for i in range(q):
    l, r = read_line(int, int)

    if c == 0:
        print(0)
        continue
    print(m[r - 1] - m[l - 1])
n = int(input())
a = list(map(int,input().split()))
MAX = max(a)
ans = 0
maxflg = False
minflg = False
for i in range(n):
    if a[i] == MAX:
        maxflg = True
        if i == 0:
            index = i + 1
        leftMAX = max(a[:index])
    if maxflg:
        ans += MAX - a[i]

for i in range(n):
    if a[i] == MAX:
        break
    else:
        ans += leftMAX - a[i] 
print(ans)

### FIXED CODE ###

n = int(input())
a = list(map(int,input().split()))
ans = 0
for i in range(n-1):
    if a[i] <= a[i+1]:
        pass
    else:
        ans += a[i] - a[i+1]
        a[i+1] = a[i]
print(ans)
from collections import deque
 
h,w=map(int, input().split())  
s=[list(input()) for i in range(h)]
v=[]
def bfs():
    d = [[float("inf")] * w for i in range(h)]
    que = deque([])
    #黒だったらスタートキューに入れる
    for i in range(h):
        for j in range(w):
            if s[i][j]=='#':
                que.append((i, j))
                d[i][j]=0
    dx = [1, 0, -1, 0]
    dy = [0, 1, 0, -1]
    
    
    while que:
        p = que.popleft()
         # 黒にする4方向をループ
        for i in range(4):
            ny = p[0] + dx[i]
            nx = p[1] + dy[i]
 
            if 0<=nx<w and 0<=ny<h and d[nx][ny] == float("inf"):
                que.append((ny, nx))
                d[nx][ny] = d[p[0]][p[1]] + 1
                
    for i in range(h):
        v.append(max(d[i]))
    return max(v)
res=bfs()
print(res)

### FIXED CODE ###

from collections import deque
 
h, w = map(int, input().split())
s = [input() for i in range(h)]
 
d = [[h+w for j in range(w)] for i in range(h)]
que = deque()
 
#黒だったらスタートキューに入れる
for i in range(h):
  for j in range(w):
    if s[i][j]=='#':
        que.append((i, j))
        d[i][j] = 0
 
dx = [1, 0, -1, 0]
dy = [0, 1, 0, -1]
 
 
while que:
    p = que.popleft()
    # 黒にする4方向をループ
    for i in range(4):
        nx = p[1] + dx[i]
        ny = p[0] + dy[i]
 
        if (0<=nx<w) and (0<=ny<h) and (d[ny][nx]==h+w):
            que.append((ny, nx))
            d[ny][nx] = d[p[0]][p[1]] + 1
 
res = max(map(max, d))
print(res)
import itertools

N = int(input())
P = tuple(map(int, input().split()))
Q = tuple(map(int, input().split()))

all_pattern = list(itertools.permutations([i for i in range(1,N+1)]))
#print(all_pattern)

for i, node in enumerate(all_pattern):
  if node == P:
    p = i
  elif node  ==  Q:
    q = i
    
    
print(abs(p-q))

### FIXED CODE ###

import itertools

N = int(input())
P = tuple(map(int, input().split()))
Q = tuple(map(int, input().split()))

all_pattern = list(itertools.permutations([i for i in range(1,N+1)]))
#print(all_pattern)

for i, node in enumerate(all_pattern):
  if node == P:
    p = i
  if node ==  Q:
    q = i
    
    
print(abs(p-q))
n, m = map(int, input().split())
a = [0] * n
b = [0] * n
for i in range(n):
    a[i], b[i] = map(int, input().split())
match = 0
ans = 0
mini = 0

while 1:
    mini = min(a)
    
    for j in range(b[a.index(mini)]):
        ans += mini
        match += 1
        if m == match:
            break
    
    a.remove(mini)
print(ans)

### FIXED CODE ###

# sys.stdin.readline()
import sys
input = sys.stdin.readline

n, m = map(int, input().split())
ab = []
ans = 0
for i in range(n):
    a, b = map(int, input().split())
    ab.append((a,b))
ab = sorted(ab)
for c, d in ab:
    if m >= d:
        ans += c*d
        m -= d
    else:
        ans += c*m
        break
print(ans)
n=int(input())
h=list(map(int,input().split()))
cnt=0
for i in range(n):
  if h[i+1]<h[i]:
    cnt=1
if cnt==1:
  if min(h)=<max(h)=<1+min(h):
    print('Yes')
  else:
    print('No')
else:
  print('Yes')

### FIXED CODE ###

n=int(input())
h=list(map(int,input().split()))
for i in range(1,n):
  if h[-i]+1==h[-i-1]:
    h[-i-1]-=1
  elif h[-i]+1<h[-i-1]:
    print('No')
    exit()
print('Yes')
import sys
from bisect import *
from collections import *
from copy import deepcopy
from heapq import *
from itertools import *
from math import *
from operator import *
import numpy as np

sys.setrecursionlimit(10**8)

input = sys.stdin.readline

def main():
    """ main """
    N,K = map(int, input().split())
    MOD = 10**9+7

    for i in range(1,K+1):
        ans = 0
        a = factorial(N-K+1)//(factorial(N-K+1-i)*factorial(i))
        b = factorial(K-1)//(factorial(K-i)*factorial(i-1))
        print(a*b % MOD)

if __name__ == '__main__':
    main()

### FIXED CODE ###

import sys
from bisect import *
from collections import *
from copy import deepcopy
from heapq import *
from itertools import *
from math import *
from operator import *
import numpy as np

sys.setrecursionlimit(10**8)

input = sys.stdin.readline

def main():
    """ main """
    N,K = map(int, input().split())
    MOD = 10**9+7

    for i in range(1,K+1):
        if N-K+1-i < 0:
            print(0)
        else:
            a = factorial(N-K+1)//(factorial(N-K+1-i)*factorial(i))
            b = factorial(K-1)//(factorial(K-i)*factorial(i-1))
            print(a*b % MOD)

if __name__ == '__main__':
    main()
n = int(input())
s = 0
for i in range(1,4):
  s += a**i

### FIXED CODE ###

n = int(input())
s = 0
for i in range(1,4):
  s += n**i
print(s)
x,y = map(int, input().split())
if x==0 and y==0:
 break
if x < y:
 print(x,y)
else:
 print(y,x)

 


### FIXED CODE ###

while True:
 x,y = map(int, input().split())
 if x==0 and y==0:
  break
 if x <= y:
  print(x,y)
 else:
  print(y,x)
print((int(input() - 2) * 180)

### FIXED CODE ###

print((int(input()) - 2) * 180)
1000000000 141421 173205

### FIXED CODE ###

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

mod = 10**9+7

def modinv(a, mod=10**9+7):
    return pow(a, mod-2, mod)

def combination(n, r, mod=10**9+7):
    r = min(r, n-r)
    res = 1
    for i in range(r):
        res = res * (n - i) * modinv(i+1, mod) % mod
    return res

sum = pow(2,n,mod)
case = combination(n,a,mod) + combination(n,b,mod) + 1
ans = sum-case
while ans < 0 :
    ans += mod

print(ans)
N = int(input())
ans = 0
for i in range(1, N+1)
    ans += i
print(ans)

### FIXED CODE ###

N = int(input())
ans = 0
for i in range(1, N+1):
    ans += i
print(ans)