Harryxun/stf_run huggingface dataset:
N,M=map(int,input().split())
A=list(map(int,input().split()))
A=[a//2 for a in A]

def lcm(x,y):
    xy=x*y
    while y!=0:
        x,y=y,x%y
    return xy//x

a1=A.pop()
a2=A.pop()
LCM=lcm(a1,a2)
while A!=[]:
    a2=A.pop()
    LCM=lcm(LCM,a2)
if LCM>M:
    ans=0
else:
    ans=int(-(-(M//LCM)//2))
print(ans)

### FIXED CODE ###

import sys
N,M=map(int,input().split())
A=list(set(map(int,input().split())))
N=len(A)
A=[a//2 for a in A]

def f(x):
    cnt=0
    while x%2==0:
        x//=2
        cnt+=1
    return cnt
C=f(A[0])
for a in A:
    if f(a)!=C:
        print(0)
        sys.exit()
def lcm(x,y):
    xy=x*y
    while y!=0:
        x,y=y,x%y
    return xy//x
LCM=A[0]
for i in range(1,N):
    LCM=lcm(LCM,A[i])
if LCM>M:
    ans=0
else:
    M//=LCM
    ans=(M+1)//2
print(ans)
n, k = map(int, input().split())
s = input()
s = list(s)
s[k] = s[k].lower()
print(''.join(s))

### FIXED CODE ###

n, k = map(int, input().split())
s = input()
s = list(s)
s[k-1] = s[k-1].lower()
print(''.join(s))
#ABC 103
import math
from functools import reduce

def lcm(*numbers):
    return reduce(lcm_base, numbers, 1)
N=int(input())
A = [int(j) for j in input().split()]

ans = 0
for a in A:
    ans+=(lcm(*A)-1)%a
print(ans)

### FIXED CODE ###

#ABC 103
N=int(input())
A = [int(j) for j in input().split()]
print(sum(A)-len(A))
N, K, S = map(int, input().split())
print(*([S]*K + [S+1]*(N-K)))


### FIXED CODE ###

def resolve():
    H = int(input())
    W = int(input())
    N = int(input())
    m = max(H, W)
    print(N // m if N / m == N//m else N // m + 1)
resolve()
r,c=map(int,raw_input().split())
m=[]
ans=[]

for i in range(r):
	a=map(int,raw_input().split())
	m.append(a)
	sum=0
	for j in range(c)
		print(a[j]),
		sum+=a[j]
	print(sum)
total=0
for i in range(c):
	sum=0
	for j in range(r):
		sum+=m[j][i]
	print(sum),
	total+=sum
print(total)

### FIXED CODE ###

r,c=map(int,raw_input().split())
m=[]
ans=[]

for i in range(r):
	a=map(int,raw_input().split())
	m.append(a)
	sum=0
	for j in range(c):
		print(a[j]),
		sum+=a[j]
	print(sum)
total=0
for i in range(c):
	sum=0
	for j in range(r):
		sum+=m[j][i]
	print(sum),
	total+=sum
print(total)
N = int(input())
A = []
for i in range(N):
	A.append(int(input()))
A.sort()
ary1 = [A[0]]
ary2 = [A[N-1]]
fst = 0
lst = N
fst_flg = False
sum1, sum2 = 0,0
while fst + 1 < lst:
	if fst_flg:
		fst_flg = False
		if fst + 2 != lst:
			fst += 1
			ary1 = [A[fst]] + ary1 + [A[fst+1]]
			ary2 = [A[N-1-fst]] + ary2 + [A[N-1-fst-1]]
			fst += 1
			l = len(ary1)
			sum1 += abs(ary1[0]-ary1[1]) + abs(ary1[l-1]-ary1[l-2])
			sum2 += abs(ary2[0]-ary2[1]) + abs(ary2[l-1]-ary2[l-2])
		else:
			fst += 1
			ary1 = [A[fst]] + ary1
			ary2 = [A[N-1-fst]] + ary2
			sum1 += abs(ary1[0]-ary1[1])
			sum2 += abs(ary2[0]-ary2[1])
	else:
		fst_flg = True
		if fst + 2 != lst:
			lst -= 1
			ary1 = [A[lst]] + ary1 + [A[lst-1]]
			ary2 = [A[N-1-lst]] + ary2 + [A[N-lst]]
			lst -= 1
			sum1 += abs(ary1[0]-ary1[1]) + abs(ary1[l-1]-ary1[l-2])
			sum2 += abs(ary2[0]-ary2[1]) + abs(ary2[l-1]-ary2[l-2])
		else:
			lst -= 1
			ary1 = [A[lst]] + ary1
			ary2 = [A[N-1-lst]] + ary2
			sum1 += abs(ary1[0]-ary1[1])
			sum2 += abs(ary2[0]-ary2[1])
print(max(sum1,sum2))

### FIXED CODE ###

N = int(input())
A = []
for i in range(N):
	A.append(int(input()))
A.sort()
if N % 2 == 0:
	print(-2*sum(A[:N//2-1]) + 2*(sum(A[N//2+1:])) + A[N//2] - A[N//2-1])
	exit()

a = 2*sum(A[N//2+1:]) - 2*sum(A[:N//2-1]) - A[N//2] - A[N//2-1]
b = 2*sum(A[N//2+2:]) - 2*sum(A[:N//2]) + A[N//2] + A[N//2+1]
print(max(a,b))
a = {1,2,3}- int(input())
print(int(a-int(input())))

### FIXED CODE ###

X = {1,2,3}
a = {int(input())}
b = {int(input())}
print(list(X-a-b)[0])
x = input()

ans = x.islower()

#大文字 false
if ans == false:
  print('A')
else:
  print('a')

### FIXED CODE ###

x = input()

ans = x.islower()

#大文字 false
if ans == False:
  print('A')
else:
  print('a')
def gcdf(a,n,gcdv):
#    print("a:",a)
    a0=a[0]
    ramin=10**9
    ramin0=20**9
    while ramin0!=ramin:
        ramin0=ramin
        for i in range(n):
            a[i]=a[i]%a0
            if a[i]==0:
                a[i]=a0
            if ramin>a[i]:
                ramin=a[i]
            if ramin<=gcdv:
                return gcdv
        a0=min(a)
#        print("a:",a,ramin)
    return ramin


#n=2
#a=[1000000000, 1000000000]
#n=4
#a=[15, 18, 24, 36]
n=int(input())

a=[]
for i in map(int,input().split()):
    a.append(i)

#print(a)
if n==2:
    print(max(a))
elif n>=16:
    a.sort()
    ns=int(n/4)
    a1=a[0:ns]
    a2=a[ns:ns*2]
    a3=a[ns*2:ns*3]
    a4=a[ns*3:n]
#    print(a1)
#    print(a2)
#    print(a3)
#    print(a4)
    gcdv=0
    gcd1=gcdf(a1,len(a1),gcdv)
    gcd2=gcdf(a2,len(a2),gcdv)
    gcd3=gcdf(a3,len(a3),gcdv)
    gcd4=gcdf(a4,len(a4),gcdv)
    for i in range(ns):
#        acpy=list(a1)
        acpy=a1.copy()
        acpy.append(gcd2)
        acpy.append(gcd3)
        acpy.append(gcd4)
        del acpy[i]
#        print(i,acpy)
        gcdx=gcdf(acpy,len(acpy),gcdv)
        if gcdx>gcdv:
            gcdv=gcdx
#    print(gcdv,a1)
    for i in range(ns):
#        acpy=list(a2)
        acpy=a2.copy()
        acpy.append(gcd1)
        acpy.append(gcd3)
        acpy.append(gcd4)
        del acpy[i]
#        print(i,acpy)
        gcdx=gcdf(acpy,len(acpy),gcdv)
        if gcdx>gcdv:
            gcdv=gcdx
#    print(gcdv,a2)
    for i in range(ns):
#        acpy=list(a3)
        acpy=a3.copy()
        acpy.append(gcd1)
        acpy.append(gcd2)
        acpy.append(gcd4)
        del acpy[i]
#        print(i,acpy)
        gcdx=gcdf(acpy,len(acpy),gcdv)
        if gcdx>gcdv:
            gcdv=gcdx
#    print(gcdv,a3)
    for i in range(ns):
#        acpy=list(a4)
        acpy=a4.copy()
        acpy.append(gcd1)
        acpy.append(gcd2)
        acpy.append(gcd3)
        del acpy[i]
#        print(i,acpy)
        gcdx=gcdf(acpy,len(acpy),gcdv)
        if gcdx>gcdv:
            gcdv=gcdx
#    print(gcdv,a4)
    print(gcdv)
    
else:
    gcdv=0
    a.sort()
    for i in range(n):
        acpy=list(a)
        del acpy[i]
        gcdx=gcdf(acpy,n-1,gcdv)
        if gcdx>gcdv:
            gcdv=gcdx
    print(gcdv)


### FIXED CODE ###

icase=0
if icase==0:
    a,b,t=map(int,input().split())
    n=(t+0.5)//a
    print(b*int(n))
from math import factorial as f
x,y=map(int,input().split())
a=f(x)//(f(x-2)*2)
b=f(y)//(f(y-2)*2)
print(a+b)

### FIXED CODE ###

from math import factorial as f
x,y=map(int,input().split())
if(x<2):
    a=0
else:
    a=f(x)//(f(x-2)*2)
if(y<2):
    b=0
else:    
    b=f(y)//(f(y-2)*2)
print(a+b)
times=int(input())
answers=[]
for i in range(times):
    hen=[]
    hen=input().split()
    for j in range(times):
        hen[j]=int(hen[j])
    for j in range(times-1):
        for k in range(times-1):
            if hen[j]>hen[j+1]:
                num=hen[j]
                hen[j]=hen[j+1]
                hen[j+1]=num
    if hen[0]*hen[0]+hen[1]*hen[1]==hen[2]*hen[2]:
        answers.append('Yes')
    else:
        answers.append('No')

for i in range(len(answers)):
    print(answers[i])

### FIXED CODE ###

[print("YES" if x[0] + x[1] == x[2] else "NO") for x in [sorted([x * x for x in [int(i) for i in input().split(" ")]]) for _ in range(int(input()))]]
k=int(input())
x,y=map(int,input().split())
d=abs(x)+abs(y)
if k%2==0 and d%2!=0:
  print(-1)
else:
  ans=[]
  if d<k and d%2==1:
    n=3
    td=k-d
    ans.append((x,y+td))
    ans.append((x+(k-td//2),y+td//2))
    ans.append((x,y))
  elif d<k and d%2==0:
    n=2
    if abs(x)>=abs(y):
      m=(abs(x)-abs(y))//2
      tk=k-m
      if x<0:
        m*=-1
      if y<0:
        tk*=-1
      ans.append((m,tk))
    else:
      m=(abs(y)-abs(x))//2
      tk=k-m
      if y<0:
        m*=-1
      if x<0:
        tk*=-1
      ans.append((tk,m))
    ans.append((x,y))
  print(n)
  for tx,ty in ans:
    print(tx,ty)

### FIXED CODE ###

def editarr(x,y,arr):
  if abs(x)>=abs(y):
    for i in range(len(arr)):
      arr[i][0],arr[i][1]=arr[i][1],arr[i][0]
  if x<0:
    for i in range(len(arr)):
      arr[i][0]*=-1
  if y<0:
    for i in range(len(arr)):
      arr[i][1]*=-1

k=int(input())
x,y=map(int,input().split())
ans=[]
tx=abs(x)
ty=abs(y)
if tx>=ty:
  tx,ty=ty,tx
if k%2==0 and (tx+ty)%2!=0:
  print(-1)
else:
  if tx+ty<k:
    if (tx+ty)%2==0:
      m=(ty-tx)//2
      ans.append([k-m,m])
    else:
      td=k-(tx+ty)
      ans.append([tx,ty+td])
      ans.append([tx+(k-td//2),ty+td//2])
    ans.append([tx,ty])
    n=len(ans)
  elif ty-(k-tx%k)<k and (ty-(k-tx%k))%2!=0:
    if tx<k and ty<k:
      if (2*k-(tx+ty))%2==0:
        td=2*k-(tx+ty)
        ans.append([tx+td//2,k-(tx+td//2)])
        ans.append([tx,ty])
      else:
        ans.append([tx,k-tx])
        td=ty-(k-tx)
        ans.append([tx+(k-td//2),ans[-1][1]+td//2])
        ans.append([tx,ty])
      n=len(ans)
    else:
      if tx+ty<2*k:
        if (2*k-(tx+ty))%2==0:
          td=2*k-(tx+ty)
          ans.append([tx+td//2,k-(tx+td//2)])
          ans.append([tx,ty])
        else:
          ans.append([tx,k-tx])
          td=ty-(k-tx)
          ans.append([tx+(k-td//2),ans[-1][1]+td//2])
          ans.append([tx,ty])
        n=len(ans)
      else:
        ans.append([0,0])  
  else:
    ans.append([0,0])
    for i in range(tx//k):
      ans.append([ans[-1][0]+k,0])
    if ans[-1][0]!=tx:
      ans.append([tx,k-abs(tx-ans[-1][0])])
    td=ty-ans[-1][1]
    if td%k==0:
      flag=True
    else:
      flag=False
    for i in range(td//k):
      if flag==False and (ty-ans[-1][1])%2==0 and (ty-ans[-1][1])<=2*k:
          break
      ans.append([tx,ans[-1][1]+k])
    if ans[-1][1]!=ty:
      td=ty-ans[-1][1]
      ans.append([tx+(k-td//2),ans[-1][1]+td//2])
      ans.append([tx,ty])
    ans.pop(0)
    n=len(ans)
  editarr(x,y,ans)
  print(n)
  for a,b in ans:
    print(a,b)
#!/usr/bin/env python3
h, w, k = map(int, input().split())
s = [input() for _ in range(h)]
ans = []
c = 1
for i in s:
    if i == "." * w:
        ans.append([0] * w)
    else:
        f = i.index("#")
        ans.append([c] * (f + 1))
        for j in i[f + 1:]:
            if j == "#":
                c += 1
            ans[-1].append(c)
        c += 1
for i in range(h):
    if s[i] == "."*w:
        ans[i] = ans[i-1 if i > 1 else i +1]

for i in ans:
    print(*i)


### FIXED CODE ###

#!/usr/bin/env python3
h, w, k = map(int, input().split())
s = [input() for _ in range(h)]
ans = []
c = 1
for i in s:
    if i == "." * w:
        if ans:
            ans.append(ans[-1])
        else:
            ans.append([0]*w)
    else:
        f = i.index("#")
        ans.append([c] * (f + 1))
        for j in i[f + 1:]:
            if j == "#":
                c += 1
            ans[-1].append(c)
        c += 1
for i in range(h):
    if ans[i] != [0]*w:
        for j in range(i):
            ans[j] = ans[i]
        break
for i in ans:
    print(*i)
from sys import stdin


def calc_area_size(a):
    return int(3 * (int(a) ** 2))


if __name__ == '__main__':
    r = stdin.readline().rstrip()
    print(calc_area_size(r)

### FIXED CODE ###

from sys import stdin

print(int(3 * (int(stdin.readline().rstrip()) ** 2)))
from math import *

n = int(input())
s = input()
d = {'P': 0, 'W': 0, 'G': 0, 'Y': 0}
for x in range(len(s)):
  d[s[x]] += 1
print('Four' if all(map(lambda x: x > 0, d.values())) else 'Three')


### FIXED CODE ###

from math import *

n = int(input())
s = input()
b = False
for x in range(len(s)):
  if s[x] is 'Y':
    b = True
    break
print('Four' if b else 'Three')
N,M=map(int,input())

ans=1900M+100(N-M)*2^M

### FIXED CODE ###

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

ans=(1900*M+100*(N-M))*(2**M)
print(ans)
#!/usr/bin/env python3
import math

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

def main():
    A, B = map(int, input().split())
    C = math.gcd(A,B)
    if C == 1:
        print(1)
    else:
        ans = prime_factorize(C)
        print(len(set(ans)) + 1)


if __name__ == "__main__":
    main()


### FIXED CODE ###

#!/usr/bin/env python3
import fractions

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

def main():
    A, B = map(int, input().split())
    C = fractions.gcd(A,B)
    if C == 1:
        print(1)
    else:
        ans = prime_factorize(C)
        print(len(set(ans)) + 1)


if __name__ == "__main__":
    main()
n,m,k = list(map(int,input().split()))
a = list(map(int,input().split()))
b = list(map(int,input().split()))

from collections import deque
a = deque([x for x in a])
b = deque([x for x in b])
a.append(10**9+1)
b.append(10**9+1)
ans = 0
def cnt(a,b,time):
  global ans
  #print(ans, time,a,b)
  if (time <= k) & ( (len(a) > 1) | (len(b) > 1)):
    if a[0] < b[0]:
      time += a[0]
      #a.popleft()
    else:
      time += b[0]
      #b.popleft()
    if time <= k:
      ans += 1
      cnt(a,b,time)

cnt(a,b,0)
print(ans)

### FIXED CODE ###

n, m, k = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
sa = [0] * (n + 1)
sb = [0] * (m + 1)
for i in range(n):
  sa[i + 1] = sa[i] + a[i]
for i in range(m):
  sb[i + 1] = sb[i] + b[i]
r = m
ans = 0
for i in range(n + 1):
  if sa[i] > k:
    break
  while sa[i] + sb[r] > k:
    r -= 1
  ans = max(ans, i + r)
print(ans)
import sys
read = sys.stdin.buffer.read
input = sys.stdin.buffer.readline
inputs= sys.stdin.buffer.readlines
#rstrip().decode('utf-8')

import numpy as np
#import operator
#import bisect
#from heapq import heapify,heappop,heappush
#from math import gcd
#from fractions import gcd
#from collections import deque
#from collections import defaultdict
#from collections import Counter
#from itertools import accumulate
#from itertools import groupby
#from itertools import permutations
#from itertools import combinations
#scipy.sparse import csr_matrix
#scipy.sparse.csgraph import floyd_warshall
#from scipy.sparse.csgraph import csgraph_from_dense
#from scipy.sparse.csgraph import dijkstra
#sys.setrecursionlimit(10**7)

#map(int,input().split())

def main():
    N,K=map(int,input().split())
    ans=0
    for i in range(K+1,N+1):
        ans+=(N//i)*(i-K)+max((N%i-max(K,1)+1),0)
    print(ans)



if __name__ == '__main__':
    main()

### FIXED CODE ###

import sys
read = sys.stdin.buffer.read
input = sys.stdin.buffer.readline
inputs= sys.stdin.buffer.readlines
#rstrip().decode('utf-8')

#import numpy as np
#import operator
#import bisect
#from heapq import heapify,heappop,heappush
#from math import gcd
#from fractions import gcd
#from collections import deque
#from collections import defaultdict
#from collections import Counter
#from itertools import accumulate
#from itertools import groupby
#from itertools import permutations
#from itertools import combinations
#scipy.sparse import csr_matrix
#scipy.sparse.csgraph import floyd_warshall
#from scipy.sparse.csgraph import csgraph_from_dense
#from scipy.sparse.csgraph import dijkstra
#sys.setrecursionlimit(10**7)

#map(int,input().split())

def main():
    N,K=map(int,input().split())
    ans=0
    for i in range(K+1,N+1):
        ans+=(N//i)*(i-K)+max((N%i-max(K,1)+1),0)
    print(ans)



if __name__ == '__main__':
    main()
def neighbor(N, edges):
    neighbor_list = [[] for _ in range(N)]
    for i in range(N):
        for vs in edges:
            if i + 1 in vs: # vsは頂点i+1が含まれるedge
                neighbor_list[i] += vs
        neighbor_list[i] = list(set(neighbor_list[i]))
        neighbor_list[i].remove(i + 1)
        
    return neighbor_list

def neighbor2(N, edges):
    nlist = neighbor(N, edges)
    nneighbor_list = [[] for _ in range(N)]
    for i in range(N):
        nneighbor_list[i] += nlist[i]
        for e in nlist[i]:
            nneighbor_list[i] += nlist[e - 1]
        nneighbor_list[i] = list(set(nneighbor_list[i]))
        nneighbor_list[i].remove(i + 1)
    return nneighbor_list
        
        
def combination(N, K, nnlist):
    combi = 1
    clist = [False]*N
    for v in range(N):
        print(combi)
        combi *= (K - len([t for t in nnlist[v] if clist[t-1]]))
        clist[v] = True
    return combi

def paint(N, K, nlist, nnlist, clist, vlist, combi):
    vlist_next = []
    for v in vlist:
        #nnlistの中で塗られている頂点の数を数え、色候補数Kから引く
        combi *= (K - len([t for t in nnlist[v - 1] if clist[t - 1]])) 
        clist[v - 1] = True #頂点vを塗る
        vlist_next += [t for t in nlist[v - 1] if not clist[t - 1]]
    return combi, vlist_next, clist


if __name__ == '__main__':
    N, K = map(int, input().split())
    edges = [None]*(N-1)
    
    for i in range(N-1):
        edges[i] = list(map(int, input().split()))
    
    nlist = neighbor(N, edges)
    nnlist = neighbor2(N, edges)
    
    vlist_next = [1]
    combi = 1
    clist = [False]*N
    for i in range(N):
        combi, vlist_next, clist = paint(N, K, nlist, nnlist, clist=clist, vlist=vlist_next, combi=combi)
        if len(vlist_next) == 0:
            break
    
    print(combi%1000000007)

### FIXED CODE ###

import sys
sys.setrecursionlimit(1000000)

def neighbor(N, edges):
    neighbor_list = [[] for _ in range(N)]
    for a, b in edges:
        neighbor_list[a-1] += [b-1]
        neighbor_list[b-1] += [a-1]
        
    return neighbor_list


def paint(K, nlist, now_num, from_num, case_num):
        mod = 1000000007
        if  from_num == -1:
            can_use_color = K - 1
        else:
            can_use_color = K - 2
        
        if len(nlist[now_num]) - 1 > can_use_color:
            return 0
        
        for child in nlist[now_num]:
            if child == from_num:
                continue
            else:
                case_num *= can_use_color
                can_use_color -= 1
                case_num %= mod
        
        for child in nlist[now_num]:
            if child == from_num:
                continue
            else:
                case_num = paint(K, nlist, child, now_num, case_num)
        return case_num%mod
            

if __name__ == '__main__':
    N, K = map(int, input().split())
    edges = [None]*(N-1)
    
    for i in range(N-1):
        edges[i] = list(map(int, input().split()))
    
    nlist = neighbor(N, edges)


    print(paint(K, nlist, 0, -1, K))
s, w = map(str(), input().split())
if w >=  s:
  print('unsafe')
elif:
  print('safe')

### FIXED CODE ###

s, w = input().split()
if int(w) >=  int(s):
  print('unsafe')
else:
  print('safe')
n = int(input())
num = [int(input()) for _ in range(n)]
m = max(num)
sec = num.sort[-2]
for x in num:
  if x != m:
    print(x)
  else:
    print(sec)

### FIXED CODE ###

n = int(input())
num = [int(input()) for _ in range(n)]
m = max(num)
sec = sorted(num)[-2]
for x in num:
    if x != m:
        print(m)
    else:
        print(sec)
n = int(input())
a = list(map(int,input().split()))
b = list(map(int,input().split()))
c = list(map(int,input().split()))
ans = 0
for i in range(n):
    ans += b[a[i]-1]
    if i < n-1 and a[i+1] == a[i] + 1:
        ans += c[i-1]
print(ans)

### FIXED CODE ###

n = int(input())
a = list(map(int,input().split()))
b = list(map(int,input().split()))
c = list(map(int,input().split()))
ans = 0
for i in range(n):
    ans += b[a[i]-1]
    if i < n-1 and a[i+1] == a[i] + 1:
        ans += c[a[i]-1]
print(ans)
s = input()
print('2018/01' + s[-2] + a[-1])

### FIXED CODE ###

s = input()
print('2018/01/' + s[-2] + s[-1])
n, k = map(int, input().split())
a = set()

for _ in range(k):
  d = int(input())
  while m <= d:
    a.append(int(input()))
    m += 1

print(n - len(a))

### FIXED CODE ###

n, k = map(int, input().split())
a = []

for _ in range(k):
  d = int(input())
  a += [int(m) for m in input().split()]

print(n - len(set(a)))
def kaijou(n):
    if (n == 1):
        return 1
    else:
        return n * kaijou(n - 1)

n , k = list(map(int, input().split()))
for i in range(1, k + 1):
    c = kaijou(k + i) / kaijou(i - 1)
    a = kaijou(n - (k + i) + 1)
    b = kaijou(n - k + 1)
    print(c * a / b)

### FIXED CODE ###

import numpy as np
import math

n , k = list(map(int, input().split()))
def combi(a,b):
    return  math.factorial(a) // (math.factorial(b) * math.factorial(a-b))
i = 2
mod = 10 ** 9 + 7
for i in range(1, k + 1):
    if n - k + 1 >= i and k - 1 >= i - 1:
        print(int(combi(n - k + 1,i) * combi(k - 1, i - 1) % mod))
    else:
        print(0)
import math
N=int(input())
X=sorted(list(map(int,input().split(' '))))
ans =math.inf
for i in range(X[0],X[-1]+1):
    tmp = 0
    for j in X:
        tmp += (j-i)**2
    ans = min(ans,tmp)
print(ans)

### FIXED CODE ###

N=int(input())
X=sorted(list(map(int,input().split(' '))))
ans = 10**9
for i in range(X[0],X[-1]+1):
    tmp = 0
    for j in X:
        tmp += (j-i)**2
    ans = min(ans,tmp)
print(ans)
from collections import Counter

N = int(input())
s = [0]*(N-1)
for i in range(N-1):
    s[i] = int(input())

ct = Counter(s)

for i in range(N):
    print(ct[i+1])


### FIXED CODE ###

import collections

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

ct = collections.Counter(s)

for i in range(N):
    print(ct[i+1])
from collections import defaultdict
(n,), digits = [list(map(int, list(s.rstrip()))) for s in open(0)]

n = int(n)
cnt = sum(digits)
x = int(''.join(map(str, digits)), 2)

d = defaultdict(int)
d[0] = 0
def calc(m):
    if m not in d:
        nxt = m % bin(m).count('1')
        d[m] = calc(nxt) + 1
    return d[m]

mmod = cnt - 1
pmod = cnt + 1

if mmod:
    mx = x % mmod
px = x % pmod

mbase = 1
pbase = 1

ans = []
while digits:
    digit = digits.pop()
    
    if digit and not mmod:
        ans.append(0)
    else:
        if digit:
            nx = (mx - mbase)%mmod
        else:
            nx = (px + pbase)%pmod
        ans.append(calc(nx) + 1)

    if mmod:
        mbase = (mbase * 2) % mmod
    pbase = (pbase * 2) % pmod

while ans:
    print(ans.pop())

### FIXED CODE ###

from sys import exit
from collections import defaultdict
n,x = open(0).read().split()
n = int(n)
cnt = x.count('1') 
digits = list(map(int, list(x)))
x = int(x, 2)

d = defaultdict(int)
d[0] = 0
def calc(m):
    if m not in d:
        nxt = m % bin(m).count('1')
        d[m] = calc(nxt) + 1
    return d[m]

if n == 1:
    print(calc(x^1))
    exit()

mmod = cnt - 1
pmod = cnt + 1

if mmod > 0:
    mx = x % mmod
px = x % pmod

mbase = 1
pbase = 1

ans = []
while digits:
    digit = digits.pop()
    
    if digit and mmod <= 0:
        ans.append(0)
    else:
        if digit:
            nx = (mx - mbase)%mmod
        else:
            nx = (px + pbase)%pmod
        ans.append(calc(nx) + 1)

    if mmod > 0:
        mbase = (mbase * 2) % mmod
    pbase = (pbase * 2) % pmod

while ans:
    print(ans.pop())
n = int(input())
s = input()
k = int(input())

res = ""
for i in s:
    if i!=s[k]:
        res += "*" 
    else:
        res += s[k]
else:
    print(res)


### FIXED CODE ###

n = int(input())
s = input()
k = int(input())-1

res = ""
for i in s:
    if i!=s[k]:
        res += "*" 
    else:
        res += s[k]
else:
    print(res)
n = map(int, raw_input().split())
n.sort(revers=True)
for i in n:
    print i,


### FIXED CODE ###

s = list(map(int, input().split()))
print(" ".join(map(str, sorted(s, reverse=True))))
N, M = map(int, input().split())
box = []
for i in range(N):
    box.append(list(map(int, input().split())))
box = sorted(box, reverse=True, key=lambda x: x[0])
box = sorted(box, reverse=True, key=lambda x: x[1])

ans = 0

for i in range(M):
    if i == 0:
        j = 0
    while box[j][0] > M - i:
        j += 1
        if j >= N-1:
            break
    else:
        ans += box[j][1]
        j += 1
        if j >= N-1:
            break

print(ans)

### FIXED CODE ###

import heapq

N, M = map(int, input().split())
AB = [list(map(int, input().split())) for _ in range(N)]
kouho = []
ans = 0

AB = sorted(AB)

# 後ろから見て優先度付きキューで取り出す
n = 0
heapq.heapify(kouho)
for i in range(1, M+1):
    if n < N:
        while AB[n][0] <= i:
            heapq.heappush(kouho, AB[n][1] * (-1))
            n += 1
            if n >= N:
                break
    
    if kouho:
        b = heapq.heappop(kouho)
        ans += b*(-1)
    
print(ans)