Harryxun/stf_run huggingface dataset:
# -*- coding: utf-8 -*-
import sys
import math
from bisect import bisect_left
from bisect import bisect_right
from collections import defaultdict
from heapq import heappop, heappush
import itertools
from decimal import *

input = sys.stdin.readline

def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))
def inputStr(): return input()[:-1]

inf = float('inf')
mod = 1000000007

#-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
#-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-

def main():
	N = inputInt()
	A = inputList()

	A.sort()
	refd = [0 for i in range(2*100000 + 1)]
	for i,val in enumerate(A):
		for j in range(val,2*100000 + 1,val):
			if refd[j] >= 2:
				break
			refd[j] += 1

	ans = 0
	for i,val in enumerate(A):
		if refd[val] < 2:
			ans += 1

	print(ans)

#-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
#-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
if __name__ == "__main__":
	main()


### FIXED CODE ###

# -*- coding: utf-8 -*-
import sys
import math
from bisect import bisect_left
from bisect import bisect_right
from collections import defaultdict
from heapq import heappop, heappush
import itertools
from decimal import *

input = sys.stdin.readline

def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))
def inputStr(): return input()[:-1]

inf = float('inf')
mod = 1000000007

#-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
#-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-

def main():
	N = inputInt()
	A = inputList()

	A.sort()
	zyuufuku = {}
	for i,val in enumerate(A):
		if i == 0:
			continue
		if val == A[i-1]:
			if val in zyuufuku:
				pass
			else:
				zyuufuku[val] = 1

	refd = [0 for i in range(1000000 + 1)]
	for i,val in enumerate(A):
		if val in zyuufuku:
			if zyuufuku[val] > 2:
				continue
			else:
				zyuufuku[val] += 1
		for j in range(val,1000000 + 1,val):
			refd[j] += 1

	ans = 0
	for i,val in enumerate(A):
		if val in zyuufuku:
			continue
		if refd[val] < 2:
			ans += 1

	print(ans)

#-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
#-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
if __name__ == "__main__":
	main()
N,M,C= map(int,input().split())
B= list(map(int,input().split()))
now = 0
for i in range(N):
  A=list(map(int,input().split()))
    ans = C
    for j in range(M):
        ans += A[j]*B[j]
    if (ans)>0:
        now += 1
print(now)


### FIXED CODE ###

N,M,C= map(int,input().split())
B= list(map(int,input().split()))
now = 0
for i in range(N):
    A=list(map(int,input().split()))
    ans = C
    for j in range(M):
        ans += A[j]*B[j]
    if (ans)>0:
        now += 1
print(now)
import sys


def input():
    return sys.stdin.readline().strip()


sys.setrecursionlimit(10 ** 9)


def main():
    H, W = map(int, input().split())
    N = int(input())
    A = list(map(int, input().split()))
    C = [[0 for _ in range(W)] for _ in range(H)]
    h = 0
    w = 0
    flag = True
    for i in range(N):
        a = A[i]
        if flag:
            if w == W:
                h += 1
                for j in range(a):
                    C[h][j] = i + 1
                w = a
            elif w + a <= W:
                for j in range(w, w + a):
                    C[h][j] = i + 1
                w += a
            else:
                b = W - w
                for j in range(w, W):
                    C[h][j] = i + 1
                h += 1
                for j in range(a - b):
                    C[h][W - j - 1] = i + 1
                flag = False
                w = W - (a - b)
        else:
            if w == 0:
                h += 1
                for j in range(a):
                    C[h][j] = i + 1
            elif w - a >= 0:
                for j in range(w - a, a):
                    C[h][j] = i + 1
                w -= a
            else:
                for j in range(w):
                    C[h][j] = i + 1
                h += 1
                for j in range(a - w):
                    C[h][j] = i + 1
                flag = True
                w = a - w
    for i in range(H):
        print(*C[i], sep=" ")


if __name__ == "__main__":
    main()


### FIXED CODE ###

import sys
import numpy as np


def input():
    return sys.stdin.readline().strip()


sys.setrecursionlimit(10 ** 9)


def main():
    H, W = map(int, input().split())
    N = int(input())
    A = list(map(int, input().split()))
    C = np.zeros(H * W, dtype=np.int32)
    first = 0
    for i, a in enumerate(A, 1):
        C[first : first + a] = i
        first += a

    ans = C.reshape((H, W))
    ans[1::2, :] = ans[1::2, ::-1]

    for i in range(H):
        print(" ".join(ans[i].astype(str)))


if __name__ == "__main__":
    main()
a, b, c = map(int, input().split())
print(f"{c} {a} {b}")

### FIXED CODE ###

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

b = a.reverse()
if a == n:
    print()
else:
    b[0],b[n] = b[n],b[0]
    print(a.reverse())
print(e)

### FIXED CODE ###

n = int(input())
a = list(map(int,input().split()))
b = [0 for l in range(n)]

for i in range(n):
    b[a[i]-1] = i+1

for m in range(n):
    print(b[m],end="")
    print(" ",end="")
a,b,c = map(int,input().split())
print(max(0,c-a+b)

### FIXED CODE ###

a,b,c = map(int,input().split())
print(max(0,c-a+b))
n,m = map(int,input().split())

s = [0]*n
g = [0]*n

for i in range(m):
    a,b = map(int,input().split())
    if a == 1:
        s[b] = 1
    if b == n:
        g[a] = 1
for i in range(n):
    if s[i] and g[i]:
    print("POSSIBLE")
    exit()

print("IMPOSSIBLE")

### FIXED CODE ###

n,m = map(int,input().split())
route = [0]*(n+10)
for i in range(m):
    a,b = map(int,input().split())
    if a == 1:
        route[b] += 1
    if b == n:
        route[a] += 1
if 2 in route:
    print("POSSIBLE")
else:
    print("IMPOSSIBLE")
h={15:2244,12:1870,10:1520,5:850,3:550,2:380}
m={0:0}

for i in range(50):
  if i in m:
    for k,v in h.items():
      m[i+k] = min(m.get(i+k,1e9),m[i]+v)

while True:
  n = input()
  if n == 0 : break
  print(m[n/100])

### FIXED CODE ###

h={15:2244,12:1870,10:1520,5:850,3:550,2:380}
m={0:0}

for i in range(50):
  if i in m:
    for k,v in h.items():
      m[i+k] = min(m.get(i+k,1e9),m[i]+v)

while True:
  n = input()
  if n == 0 : break
  print(m[n/100])
X,Y,Z,K = map(int,input().split())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
C = list(map(int,input().split()))
A.sort(reverse=True)
B.sort(reverse=True)
C.sort(reverse=True)
E=[]
ans=[]
for i in range(X):
    for j in range(Y):
        E.append(A[i]+B[j])
for i in range(K):
    for j in range(K):
        ans.append(E[i]+C[j])
ans.sort(reverse=True)
for i in range(K):
    print(ans[i])

### FIXED CODE ###

X,Y,Z,K = map(int,input().split())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
C = list(map(int,input().split()))
C.sort(reverse=True)
E=[]
ans=[]
for i in range(X):
    for j in range(Y):
        E.append(A[i]+B[j])
E.sort(reverse=True)
for i in range(min(K,len(E))):
    for j in range(min(K,Y)):
        ans.append(E[i]+C[j])
ans.sort(reverse=True)
for i in range(K):
    print(ans[i])
while 1:
        h,w=map(int,input().split())
        if h==w==0:
                break
        p=[['#'for i in range(w)] for j in range(h)]
        for i in range(w):
                for j in range(h):
                        if (i+j)%2=1:
                                p[i][j]='.'
                        else:
                                p[i][j]='#'
        print(p)



### FIXED CODE ###

while 1:
     (H,W) = [int(i) for i in input().split()]
     if H==W==0:
          break
     for i in range(H):
          for j in range(W):
               if (i+j)%2==0:print ('#',end="")
               else: print('.',end="")
          print('')
     print('')
N = int(input())
A = {
    1: ["a"],
    2: ["aa", "ab"],
    3: ["aaa", "aab", "aba", "abb", "abc"],
    4: [
        "aaaa",
        "aaab",
        "aabb",
        "aabc",
        "abaa",
        "abab",
        "abac",
        "abba",
        "abbb",
        "abbc",
        "abca",
        "abcb",
        "abcc",
        "abcd",
    ],
    5: [
        "aaaaa",
        "aaaab",
        "aaaba",
        "aaabb",
        "aaabc",
        "aabba",
        "aabbb",
        "aabbc",
        "aabca",
        "aabcb",
        "aabcc",
        "aabcd",
        "abaaa",
        "abaab",
        "abaac",
        "ababa",
        "ababb",
        "ababc",
        "abaca",
        "abacb",
        "abacc",
        "abacd",
        "abbaa",
        "abbab",
        "abbac",
        "abbba",
        "abbbb",
        "abbbc",
        "abbca",
        "abbcb",
        "abbcc",
        "abbcd",
        "abcaa",
        "abcab",
        "abcac",
        "abcad",
        "abcba",
        "abcbb",
        "abcbc",
        "abcbd",
        "abcca",
        "abccb",
        "abccc",
        "abccd",
        "abcda",
        "abcdb",
        "abcdc",
        "abcdd",
        "abcde",
    ],
}
Ans = A[N]
for i in range(len(Ans)):
    print(Ans[i])


### FIXED CODE ###

N = int(input())
D = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j"]
Ans = [["a"]]
for i in range(1, 10):
    before = Ans[i - 1]
    # print(before)
    next = []
    for j in before:
        L = set(list(j))
        # print(L)
        for k in range(len(L) + 1):
            # print(j)
            next.append(j + D[k])
    Ans.append(next)
# print(Ans)
print(*Ans[N - 1], sep="\n")
x,y,m = map(int,input().split())
row = {}
ch = set()
column = {}
for i in range(m):
	h,k = map(int,input().split())
	ch.add((h,k))
	if h in row:
		row[h] += 1
	else:
		row[h] = 1
 
	if k in column:
		column[k] += 1
	else:
		column[k] = 1
 
 
r_max = 0
c_max = 0
 
for i in row:
	r_max = max(r_max,row[i])
for j in column:
	c_max = max(c_max,column[j])
 
r_inx = []
w_inx = []
 
for i in row:
	if row[i] == r_max:
		r_inx.append(i)
for j in column:
	if column[j] == c_max:
		w_inx.append(j)
 
flag = 0
for i in r_inx:
	for j in w_inx:
		if (i,j) not in ch:
			flag = 1
			break
if flag == 0:
	print(r_max+c_max-1)
else:
	print(r_max+c_max)
x,y,m = map(int,input().split())
row = {}
ch = set()
column = {}
for i in range(m):
	h,k = map(int,input().split())
	ch.add((h,k))
	if h in row:
		row[h] += 1
	else:
		row[h] = 1

	if k in column:
		column[k] += 1
	else:
		column[k] = 1


r_max = 0
c_max = 0

for i in row:
	r_max = max(r_max,row[i])
for j in column:
	c_max = max(c_max,column[j])

r_inx = []
w_inx = []

for i in row:
	if row[i] == r_max:
		r_inx.append(i)
for j in column:
	if column[j] == c_max:
		w_inx.append(j)

flag = 0

### FIXED CODE ###

x,y,m = map(int,input().split())
row = {}
ch = set()
column = {}
for i in range(m):
	h,k = map(int,input().split())
	ch.add((h,k))
	if h in row:
		row[h] += 1
	else:
		row[h] = 1

	if k in column:
		column[k] += 1
	else:
		column[k] = 1


r_max = 0
c_max = 0

for i in row:
	r_max = max(r_max,row[i])
for j in column:
	c_max = max(c_max,column[j])

r_inx = []
w_inx = []

for i in row:
	if row[i] == r_max:
		r_inx.append(i)
for j in column:
	if column[j] == c_max:
		w_inx.append(j)

flag = 0
for i in r_inx:
	for j in w_inx:
		if (i,j) not in ch:
			flag = 1
			break
if flag == 0:
	print(r_max+c_max-1)
else:
	print(r_max+c_max)
prev = (0,0)
pt = t
b = True

def f(a,b): return abs(b[0]- a[0]) + abs(b[1] - a[1])
for _ in range(int(raw_input())):
	t,x,y  = map(int, raw_input().split())
	if (t - pt) < f((x,y), prev):
		b = False
		break 
	prev,pt = (x,y),t

print 'Yes' if b else 'No'

### FIXED CODE ###

prev,pt = (0,0),0
b = True
def f(a,b): return abs(b[0]- a[0]) + abs(b[1] - a[1])
for _ in range(int(raw_input())):
	t,x,y  = map(int, raw_input().split())
	if (t - pt) < f((x,y), prev) :
		b = False
		break 

	if ((t - pt) - f((x,y), prev)) % 2:
		b = False
		break
	prev,pt = (x,y),t

print 'Yes' if b else 'No'
from math import gcd


def main():
    A, B, C, D = map(int, input().split())
    Q_AC, R_AC = A // C, A % C
    Q_AD, R_AD = A // D, A % D
    Q_BC, R_BC = B // C, B % C
    Q_BD, R_BD = B // D, B % D
    Q_ACD, R_ACD = A // lcm(C, D), A % lcm(C, D)
    Q_BCD, R_BCD = B // lcm(C, D), B % lcm(C, D)
    N_C = num_baisu(Q_AC, Q_BC, R_AC, R_BC)
    N_D = num_baisu(Q_AD, Q_BD, R_AD, R_BD)
    N_CD = num_baisu(Q_ACD, Q_BCD, R_ACD, R_BCD)
    print(B - A + 1 - (N_C + N_D - N_CD))
    return


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


def num_baisu(Q_A, Q_B, R_A, R_B):
    if R_A == 0 and R_B == 0:
        return Q_B - Q_A + 1
    elif R_A == 0 and R_B != 0:
        return Q_B - Q_A + 1
    elif R_A != 0 and R_B == 0:
        return Q_B - (Q_A + 1) + 1
    else:
        return Q_B - (Q_A + 1) + 1


if __name__ == "__main__":
    main()


### FIXED CODE ###

from fractions import gcd


def main():
    A, B, C, D = map(int, input().split())
    Q_AC, R_AC = A // C, A % C
    Q_AD, R_AD = A // D, A % D
    Q_BC, R_BC = B // C, B % C
    Q_BD, R_BD = B // D, B % D
    Q_ACD, R_ACD = A // lcm(C, D), A % lcm(C, D)
    Q_BCD, R_BCD = B // lcm(C, D), B % lcm(C, D)
    N_C = num_baisu(Q_AC, Q_BC, R_AC, R_BC)
    N_D = num_baisu(Q_AD, Q_BD, R_AD, R_BD)
    N_CD = num_baisu(Q_ACD, Q_BCD, R_ACD, R_BCD)
    print(B - A + 1 - (N_C + N_D - N_CD))
    return


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


def num_baisu(Q_A, Q_B, R_A, R_B):
    if R_A == 0 and R_B == 0:
        return Q_B - Q_A + 1
    elif R_A == 0 and R_B != 0:
        return Q_B - Q_A + 1
    elif R_A != 0 and R_B == 0:
        return Q_B - (Q_A + 1) + 1
    else:
        return Q_B - (Q_A + 1) + 1


if __name__ == "__main__":
    main()
def main():
    from sys import stdin
    input = stdin.readline
    import numpy as np
    h, w, n = map(int, input().split())
    ab = [list(map(int, input().split())) for _ in [0]*n]
    ab_d = {(a, b) for a, b in ab}

    ans = [set() for _ in range(9)]
    for a, b in ab:
        temp = np.full((5, 5), None)
        for i in range(max(0, 3-a), min(5, h-a+3)):
            for j in range(max(0, 3-b), min(5, w-b+3)):
                if (a+i-2, b+j-2) in ab_d:
                    temp[i, j] = 1
                else:
                    temp[i, j] = 0
        # print(temp)
        flag_yoko = [0, 5]
        flag_tate = [0, 5]
        if np.all(temp[:, 0] == np.full((1, 5), None)):
            if np.all(temp[:, 1] == np.full((1, 5), None)):
                flag_yoko[0] = 2
            else:
                flag_yoko[0] = 1
        if np.all(temp[:, 4] == np.full((1, 5), None)):
            if np.all(temp[:, 3] == np.full((1, 5), None)):
                flag_yoko[1] = 3
            else:
                flag_yoko[1] = 4
        if np.all(temp[0, :] == np.full(5, None)):
            if np.all(temp[1, :] == np.full(5, None)):
                flag_tate[0] = 2
            else:
                flag_tate[0] = 1
        if np.all(temp[4, :] == np.full(5, None)):
            if np.all(temp[3, :] == np.full(5, None)):
                flag_tate[1] = 3
            else:
                flag_tate[1] = 4
        new_temp = temp[flag_tate[0]:flag_tate[1], flag_yoko[0]:flag_yoko[1]]
        # print(new_temp)
        for i in range(flag_tate[1]-flag_tate[0]-2):
            for j in range(flag_yoko[1]-flag_yoko[0]-2):
                cnt = [new_temp[i+k, j+l] for k in range(3) for l in range(3)]
                if None not in cnt:
                    ans[sum(cnt)-1].add((a+i-2+flag_tate[0], b+j-2+flag_yoko[0]))

    for i in range(9):
        ans[i] = len(ans[i])

    print((h-2)*(w-2)-sum(ans))
    for i in ans:
        print(i)


main()


### FIXED CODE ###

h,w,n=map(int,input().split())
ab=[list(map(int,input().split())) for _ in [0]*n]
ab_d={a*(10**9)+b-1 for a,b in ab}

ans=[set() for _ in range(9)]
for a,b in ab:
    temp=[None for _ in [0]*25]
    for i in range(5):
        for j in range(5):
            if 0<a+i-2<=h and 0<b+j-2<=w:
                if (a+i-2)*(10**9)+b+j-3 in ab_d:
                    temp[i*5+j]=1
                else:
                    temp[i*5+j]=0
    for i in range(3):
        for j in range(3):
            cnt=[temp[(i+k)*5+j+l] for k in range(3) for l in range(3)]
            if None not in cnt:
                ans[sum(cnt)-1].add((a+i-2)*(10**9)+b+j-3)
                
for i in range(9):
    ans[i]=len(ans[i])

print((h-2)*(w-2)-sum(ans))
for i in ans:
    print(i)
N,K = map(int,input().split())
if k % 2 == 1:
    print((n // k) ** 3)
else:
    print((n // k) ** 3 + ((n + k // 2) // k) ** 3)

### FIXED CODE ###

N,K = map(int,input().split())
if K % 2 == 1:
    print((N // K) ** 3)
else:
    print((N // K) ** 3 + ((N + K // 2) // K) ** 3)
n = int(input())
v = list(map(int,input().split()))
dic_odd = {}
dic_even = {}

#奇数桁の中で一番多く存在する数字の数
for i in range(0,n,2):
    if v[i] in dic_odd:
        dic_odd[v[i]] += 1
    else:
        dic_odd[v[i]] = 1

#偶数桁の中で一番多く存在する数字の数
for i in range(1,n,2):
    if v[i] in dic_even:
        dic_even[v[i]] += 1
    else:
        dic_even[v[i]] = 1

odd_sorted = sorted(dic_odd.items(), key=lambda x:x[1])
even_sorted = sorted(dic_even.items(), key=lambda x:x[1])

if odd_sorted[len(odd_sorted)-1][0] == even_sorted[len(even_sorted)-1][0]:
    if len(odd_sorted) == 1 and len(even_sorted) == 1:
        print(n//2)
    elif len(odd_sorted) == 1:
        print(n//2-even_sorted[len(even_sorted)-2][1])
    elif len(even_sorted) == 1:
        print(n//2-odd_sorted[len(odd_sorted)-2][1])
    else:
        if odd_sorted[len(odd_sorted)-1][1] < even_sorted[len(even_sorted)-1][1]:
            print(n - (odd_sorted[len(odd_sorted)-1][2] + even_sorted[len(even_sorted)-1][1]))
        else:
            print(n - (odd_sorted[len(odd_sorted)-1][1] + even_sorted[len(even_sorted)-1][2]))
else:
    print(n-(odd_sorted[len(odd_sorted)-1][1]+even_sorted[len(even_sorted)-1][1]))

### FIXED CODE ###

n = int(input())
v = list(map(int,input().split()))
dic_odd = {}
dic_even = {}

for i in range(0,n,2):
    if v[i] in dic_odd:
        dic_odd[v[i]] += 1
    else:
        dic_odd[v[i]] = 1

for i in range(1,n,2):
    if v[i] in dic_even:
        dic_even[v[i]] += 1
    else:
        dic_even[v[i]] = 1

odd_sorted = sorted(dic_odd.items(), key=lambda x:x[1])
even_sorted = sorted(dic_even.items(), key=lambda x:x[1])

if odd_sorted[len(odd_sorted)-1][0] == even_sorted[len(even_sorted)-1][0]:
    if len(odd_sorted) == 1 and len(even_sorted) == 1:
        print(n//2)
    elif len(odd_sorted) == 1:
        print(n//2-even_sorted[len(even_sorted)-2][1])
    elif len(even_sorted) == 1:
        print(n//2-odd_sorted[len(odd_sorted)-2][1])
    else:
        if odd_sorted[len(odd_sorted)-1][1] < even_sorted[len(even_sorted)-1][1]:
            print(n - (odd_sorted[len(odd_sorted)-2][1] + even_sorted[len(even_sorted)-1][1]))
        elif  odd_sorted[len(odd_sorted)-1][1] > even_sorted[len(even_sorted)-1][1]:
            print(n - (odd_sorted[len(odd_sorted)-1][1] + even_sorted[len(even_sorted)-2][1]))
        else:
            if odd_sorted[len(odd_sorted)-2][1] < even_sorted[len(even_sorted)-2][1]:
                print(n - (odd_sorted[len(odd_sorted)-1][1] + even_sorted[len(even_sorted)-2][1]))
            else:
                print(n - (odd_sorted[len(odd_sorted)-2][1] + even_sorted[len(even_sorted)-1][1]))
else:
    print(n-(odd_sorted[len(odd_sorted)-1][1]+even_sorted[len(even_sorted)-1][1]))
h,w = map(int, input().split())
bord = [list(input()) for n in range(w)]
Answer = 0
for y in range(len(bord)):
    for x in range(len(bord[0])):
        if bord[y][x]=='#':
            if y==0:
                if x==0:
                    if bord[y][x+1]=='#': 
                        Answer=1;continue
                    if bord[y+1][x]=='#':
                        Answer=1;continue
                elif x==h-1:
                    if bord[y][x-1]=='#':
                        Answer=1
                        continue
                    if bord[y+1][x]=='#':
                        Answer=1;continue
                else:
                    if bord[y][x+1]=='#':
                        Answer=1;continue
                    if bord[y][x-1]=='#':
                        Answer=1;continue
                    if bord[y+1][x]=='#':
                        Answer=1;continue
            elif y==w-1:
                if x==0:
                    if bord[y][x+1]=='#':
                        Answer=1;continue
                    if bord[y-1][x]=='#':
                        Answer=1;continue
                elif x==h-1:
                    if bord[y][x-1]=='#':
                        Answer=1;continue
                    if bord[y-1][x]=='#':
                        Answer=1;continue
                else:
                    if bord[y][x+1]=='#':
                        Answer=1;continue
                    if bord[y][x-1]=='#':
                        Answer=1;continue
                    if bord[y-1][x]=='#':
                        Answer=1;continue
            elif x==0:
                if bord[y+1][x]=='#':
                    Answer=1;continue
                if bord[y-1][x]=='#':
                    Answer=1;continue
                if bord[y][x+1]=='#':
                    Answer=1;continue
            elif x==h-1:
                if bord[y+1][x]=='#':
                    Answer=1;continue
                if bord[y-1][x]=='#':
                    Answer=1;continue
                if bord[y][x-1]=='#':
                    Answer=1;continue
            else:
                if bord[y+1][x]=='#':
                    Answer=1;continue
                if bord[y-1][x]=='#':
                    Answer=1;continue
                if bord[y][x-1]=='#':
                    Answer=1;continue
                if bord[y][x+1]=='#':
                    Answer=1;continue
if Answer == 1:
    print('Yes')
else:
    print('No')




### FIXED CODE ###

a,b = map(int, input().split())
if a > b:
    print(a-1)
else:
    print(a)
a,b = map(int,input().split())
ans = a*b
if ans % 2 = 0:
    print("Even")
else:
    print("Odd")

### FIXED CODE ###

a,b=map(int,input().split())
p = a*b % 2
if p == 0 :
    print("Even")
else:
    print("Odd")
a,b,c,d=[int(i) for i in input().split()]
if (abs(a,b)>=d and abs(b,c)>=d) or abs(a,c)>=d:
  print('Yes')
else:
  print('No')

### FIXED CODE ###

a,b,c,d=[int(i) for i in input().split()]
T=abs(a-b)<=d and abs(b-c)<=d
if T or abs(a-c)<=d:
  print('Yes')
else:
  print('No')
import math
def c(x,y):
  if x<y or y<0:
    return 0
  if x == 0 or y == 0:
    return 1
  elif:
    s = math.factorial(n)
    t = math.factorial(n-k)
    u = math.factorial(k)
    return s//(t*u)

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

for i in range(1,k+1):
  sol = c(n-k+1,i)*c(k-1,i-1)
  m = 10**9 +7
  ans = int(sol%m)
  print(ans)

### FIXED CODE ###

import math
 
def combination_count(n,k):
    if k > n or k < 0:
        return 0
    if n == 0 or k == 0:
        return 1
    
    s = math.factorial(n)
    t = math.factorial(k)
    u = math.factorial(n-k)
    
    return s//(t*u)
    
n,k = map(int,input().split())
 
mod = 10**9 + 7
 
for i in range(1,k+1):
    x = combination_count(n-k+1,i) * combination_count(k-1, i-1)
    print(x%mod)