Harryxun/stf_run huggingface dataset:
import fractions
def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)
n,m,*a=map(int,open(0).read().split())
a=list(set(a))
b=a[0]*a[1]// fractions.gcd(a[0], a[1])
for i in a:
    b=lcm(i,b)
print(0 if b//2>m else (m-b//2)//b+1)  

### FIXED CODE ###

def f(n):
    a=0
    while n%2==0:
        n//=2
        a+=1
    return a    
n,m,*a=map(int,open(0).read().split())
c=[f(i) for i in a]
if sum(c)!=c[0]*n:
    print(0)
    exit()
import fractions
def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)
a=list(set(a))
a=[i//(2**c[0]) for i in a]
b=a[0]
for i in a:
    b=lcm(i,b)
    if b*(2**c[0])>2*m:
        print(0)
        exit()
b*=2**c[0]    
print(0 if b//2>m else (m-b//2)//b+1)
a,b,c=input().split()
d,e,f=input().split()
g,h,i=input().split()
print(a+e+i)

### FIXED CODE ###

print(input()[0]+input()[1]+input()[2])
a=int(input())
for i in a:
  if i ==1:
    i=9
  elif i ==9:
    i=1
  print(int(a))

### FIXED CODE ###

a=int(input())
b=str(a).replace('1','a').replace('9','b')
c=b.replace('a','9').replace('b','1')
print(int(c))
rmin = 10000
for z in combinations(range(N),3):
    i,j,k = z
    x0,y0 = X[i]
    x1,y1 = X[j]
    x2,y2 = X[k]
    a = cross([x1-x0,y1-y0],[x2-x0,y2-y0])
    if a==0:continue
    s = ((x1-x0)**2+(y1-y0)**2-(x0+x1-2*x2)**2-(y0+y1-2*y2)**2)/8
    s = s/(x0*y1-x1*y0-x2*y1+x2*y0-x0*y2+x1*y2)
    x = (x0+x1)/2+s*(y1-y0)
    y = (y0+y1)/2+s*(x0-x1)
    r = dist([x,y],[x0,y0])
    flag = 0
    for m in range(N):
        if dist([x,y],X[m])<=r+epsilon:
            continue
        else:
            flag = 1
            break
    if flag==0:
        rmin = min(rmin,r)
if rmin==1000:
    rmin = 0
    for i in range(N-1):
        for j in range(i,N):
            rmin = max(rmin,dist(X[i],X[j]))
    rmin = rmin/2
print(rmin)

### FIXED CODE ###

from itertools import combinations
INFTY = 10**4
epsilon = 1e-10
def dist(x,y):
    return ((x[0]-y[0])**2+(x[1]-y[1])**2)**0.5
def cross(x,y):
    return x[0]*y[1]-x[1]*y[0]
def dot(x,y):
    return x[0]*y[0]+x[1]*y[1]
N = int(input())
X = [list(map(int,input().split())) for _ in range(N)]
rmin = INFTY
for z in combinations(range(N),3):
    i,j,k = z
    x0,y0 = X[i]
    x1,y1 = X[j]
    x2,y2 = X[k]
    r = max(dist(X[i],X[j]),dist(X[j],X[k]),dist(X[k],X[i]))/2
    if r==dist(X[i],X[j])/2:
        x = (x0+x1)/2
        y = (y0+y1)/2
    elif r==dist(X[j],X[k])/2:
        x = (x1+x2)/2
        y = (y1+y2)/2
    else:
        x = (x2+x0)/2
        y = (y2+y0)/2
    a = cross([x1-x0,y1-y0],[x2-x0,y2-y0])
    if a==0:continue
    if dot([x1-x0,y1-y0],[x2-x0,y2-y0])>=0 and dot([x0-x1,y0-y1],[x2-x1,y2-y1])>=0 and dot([x1-x2,y1-y2],[x0-x2,y0-y2])>=0:
        s = ((x1-x0)**2+(y1-y0)**2-(x0+x1-2*x2)**2-(y0+y1-2*y2)**2)/8
        s = s/(x0*y1-x1*y0-x2*y1+x2*y0-x0*y2+x1*y2)
        x = (x0+x1)/2+s*(y1-y0)
        y = (y0+y1)/2+s*(x0-x1)
        r = dist([x,y],[x0,y0])
    flag = 0
    for i in range(N):
        if dist([x,y],X[i])<=r+epsilon:
            continue
        else:
            flag = 1
            break
    if flag==0:
        rmin = min(rmin,r)
if rmin==INFTY:
    rmin = 0
    for i in range(N-1):
        for j in range(i+1,N):
            rmin = max(rmin,dist(X[i],X[j]))
    print(rmin/2)
else:
    print(rmin)
list1=[]
a,b=map(int,input().split())
d=a
e=a
if b==1:
    print(0)
else:
    for i in range(d):
        a=abs(a-b)
        list1.append(a)
        if e<a:
            break
    list2= sorted(list1, reverse=True)
    print(list2[-1])

### FIXED CODE ###

n, k = map(int, input().split())
w = n%k
w2 = abs(w-k)
if w > w2:
    print(w2)
else:
    print(w)
I = input().split()
if I[0] < I[1]:
    print("a < b")
if I[0] > I[1]:
    print("a > b")
if I[0] == I[1]:
    print("a == b")

### FIXED CODE ###

I = input().split()
if int(I[0]) < int(I[1]):
    print("a < b")
if int(I[0]) > int(I[1]):
    print("a > b")
if int(I[0]) == int(I[1]):
    print("a == b")
N = int(input())
import numpy as np
ans = 0
lis = [[0]*9]*9
lis = np.array(lis)
for i in range(1,N+1):
    a = i%10
    b = i//(10**(len(str(i))-1))
    if a != 0:
        lis[a-1][b-1] += 1
for j in range(9):
    for k in range(9):
        ans += lis[k][j]*lis[j][k]
print(ans)

### FIXED CODE ###

N = int(input())
import numpy as np
ans = 0
lis = [[0]*9]*9
lis = np.array(lis)
for i in range(1,N+1):
    a = i%10
    b = i//(10**(len(str(i))-1))
    if a != 0:
        lis[a-1][b-1] += 1
for j in range(9):
    for k in range(9):
        ans += lis[k][j]*lis[j][k]
print(ans)
user_input = input(" ")
user_input = "a","b","c" && user_input = "x,y,z"
"a","b","c" = [1,2,3]
"x","y","z" = [1,2,3]
print('The value of x after swapping: {}'.format(x))
print('The value of y after swapping: {}'.format(y))

### FIXED CODE ###

a, b, c = map(int, input().split())
print(c, a, b)
def f(a):
	s=0;q=a[:n];s=sum(q);heapify(q);yield s
	for e in a[n:2*n]:s+=e-heappushpop(q,e);yield s
from heapq import*;r=reversed;n,*a=map(int,open(0).read().split());print(max(map(sum,zip(f(a),r(f([-e for e in r(a)]))))))

### FIXED CODE ###

import sys,heapq
n=int(sys.stdin.readline())
a=list(map(int,sys.stdin.readline().split()))
sa=sb=0
la=[]
lb=[]
for i in range(n):
	sa+=a[i]
	heapq.heappush(la,a[i])
ra=[sa]
for i in range(n,2*n):
	sa+=a[i]
	heapq.heappush(la,a[i])
	sa-=heapq.heappop(la)
	ra.append(sa)
for i in range(3*n-1,2*n-1,-1):
	sb+=a[i]
	heapq.heappush(lb,-a[i])
rb=[sb]
for i in range(2*n-1,n-1,-1):
	sb+=a[i]
	heapq.heappush(lb,-a[i])
	sb+=heapq.heappop(lb)
	rb.append(sb)
print(max(x-y for x,y in zip(ra,reversed(rb))))
A,B = map(int,input().split())
C = [int(input()) for _ in range(A)]
c = []
p = 0
C = sorted(C)
for i in range(B-1,A):
  c.append(max(C[i-(B-1):i]) - min(C[i-(B-1):i]))
print(min(c))

### FIXED CODE ###

A = int(input())
B = [int(input()) for _ in range(A)]
p = 0
B = sorted(B)
b = B.pop(-1)
for i in B:
  p += i
print(b//2 + p)
N,K,Q = map(int,input().split())

lis = []
point = []

for i in range(N+1):
    point[i] = K

for x in range(int(input())):
    lis.append(input())

for i in lis:
    for j in range(N+1):
        if i == j :
            point[j] += 1
        else:
            point[i] -= 1

for i in range(N+1):
    if point[i] >= 1:
        print("Yes")
    else:
        print("No")


### FIXED CODE ###

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

lis = []
for _ in range(Q):
    lis.append(int(input()))

point = [K] * N

for i in range(Q):
    num = lis[i]
    point[num-1] += 1

for j in range(N):
    point[j] -= Q



for i in range(N):
    if point[i] > 0:
        print('Yes')
    else:
        print('No')
N = int(input())
A = [int(input()) for i in range(N)]
A_max = max(A)
A_max_count = A.count(A_max)
a_ = A[:]
a_ = sorted(a_,reverse = True)
A_next_max = a_[A_max_count]

for i in range(N):
  tmp = A[i]
  if tmp != A_max:
    print(A_max)
  else:
    if A_max_count == 1:
      print(A_next_max)
    else:
      print(A_max)

### FIXED CODE ###

N = int(input())
A = [int(input()) for i in range(N)]
A_max = max(A)
A_max_count = A.count(A_max)
if A_max_count != N:
  a_ = A[:]
  a_ = sorted(a_,reverse = True)
  A_next_max = a_[A_max_count]
else:
  A_next_max = A_max_count

for i in range(N):
  tmp = A[i]
  if tmp != A_max:
    print(A_max)
  else:
    if A_max_count == 1:
      print(A_next_max)
    else:
      print(A_max)
a,b = map(int,input().split())
if a + b < 24:
    print(a + b)
    else:
    print(a + b -24)

### FIXED CODE ###

a,b = map(int,input().split())
if a + b < 24:
    print(a + b)
else:
    print(a + b -24)
import sys


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


def main():
    N = int(input())
    h = list(map(int, input().split()))

    dflag = 0
    cmin = 0
    cmax = h[0]
    count = 0
    for i in range(1, N):
        if h[i - 1] < h[i] and dflag == 1:
            count += cmax - cmin
            cmax = h[i]
            dflag = 0
            cmin = h[i - 1]

        elif h[i - 1] > h[i]:
            dflag = 1

        elif h[i - 1] < h[i]:
            cmax = h[i]

    if dflag == 1:
        count += cmax - cmin
    else:
        count += max(cmax, h[i]) - cmin

    print(count)


if __name__ == "__main__":
    main()


### FIXED CODE ###

import sys


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


def main():
    N = int(input())
    if N==1:
        print(input())
        exit()
    h = list(map(int, input().split()))


    dflag = 0
    cmin = 0
    cmax = h[0]
    count = 0
    for i in range(1, N):
        if h[i - 1] < h[i] and dflag == 1:
            count += cmax - cmin
            cmax = h[i]
            dflag = 0
            cmin = h[i - 1]

        elif h[i - 1] > h[i]:
            dflag = 1

        elif h[i - 1] < h[i]:
            cmax = h[i]

    if dflag == 1:
        count += cmax - cmin
    else:
        count += max(cmax, h[i]) - cmin

    print(count)


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

import numpy as np
cnt = np.array([0]*N)

tree={}
tree[1]=-1

for i in range(N-1):
    a,b = map(int,input().split())
    tree[b]=a

for j in range(Q):
    p,x=map(int,input().split())
    p-=1
    cnt[p]+=x

for k in range(1,N):
    cnt[k]+=cnt[tree[k+1]-1]

# def search(root,x):
#     leaf =[]
#     for i,j in tree.items():
#         if j ==root:
#             leaf.append(i)
        
#     if len(leaf)!=0:
#         for k in leaf:
#             search(k,x)
#             cnt[k-1]+=x

# for i in range(N-1):
#     a,b = map(int,input().split())
#     tree[b]=a
# for j in range(Q):
#     p,x=map(int,input().split())
#     if p==1:
#         cnt+=x
#     else:
#         cnt[p-1]+=x
#         search(p,x)


print(*cnt)





### FIXED CODE ###

import sys #追加
sys.setrecursionlimit(500*500)

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

cost=[0]*n
edge = [[] for _ in range(n)]

for _ in range(n-1):
    a,b=map(int,input().split())
    a,b=a-1,b-1
    edge[a].append(b)
    edge[b].append(a)

for _ in range(q):
    p,x=map(int,input().split())
    cost[p-1]+=x


visited=[-1]*n


def dfs(n,c):

    cost[n]+=c
    tmp=cost[n]
    visited[n]=0

    for v in edge[n]:
        if visited[v]==-1:
            dfs(v,tmp)
    

dfs(0,0)

print(*cost)
n,m=map(int,input().split())
root=[-1]*n
def r(x):　#-1の項が何番目かを特定
  if root[x]<0: #x番目が-1ならx(>=0)を返す
    return x 
  else: #x番目が0以上なら-1の項に到達するまで回す
    root[x]=r(root[x]) 
    return root[x] #-1の項に到達したらその項が何番目かを返す
def unite(x,y):
  x=r(x)
  y=r(y)
  if x==y: #同じ項に到達した場合は処理の必要なし
    return
  root[x]+=root[y] #-1ずつ加算していく
  root[y]=x #-1を足した後は適当な数に変える(重複回避)
for i in range(m):
  a,b=map(int,input().split())
  a-=1 #リストの序数に合わせる
  b-=1
  unite(a,b) #各人間がどのくらい友達がいるか
ans=0
for i in range(n):
  ans=max(ans,-root[i]) #最多保有友人数が何人か
print(ans)


### FIXED CODE ###

n,m=map(int,input().split())
root=[-1]*n
def r(x):
  if root[x]<0:
    return x
  else:
    root[x]=r(root[x])
    return root[x]
def unite(x,y):
  x=r(x)
  y=r(y)
  if x==y:
    return
  root[x]+=root[y]
  root[y]=x
for i in range(m):
  a,b=map(int,input().split())
  a-=1
  b-=1
  unite(a,b)
ans=0
for i in range(n):
  ans=max(ans,-root[i])
print(ans)
N = input()
if N % sum(map(int, N)):
    print("No")
else:
    print("Yes")

### FIXED CODE ###

N = input()
if int(N) % sum(map(int, N)):
    print("No")
else:
    print("Yes")
def main():
    N = int(input())
    H = list(map(int, input().split()))

    judge = 'Yes'

    H[0] = H[0] - 1

    for i in range(1,N):
        if H[i-1] > H[i] :
            H[i-1] = H[i-1] - 1

    for i in range(1,N):
        if H[i-1] > H[i]:
            judge = 'No'
            
    print(judge)

if __name__ == '__main__' :
    main()

### FIXED CODE ###

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

    ans = C-(A-B)
    if ans <= 0:
        ans = 0

    print(ans)


if __name__ == '__main__' :
    main()
a,b,c=input().strip().split()

if a[-1]==b[0] and b[-1]==c[1]:
  print("YES")
else:
  print("NO")

### FIXED CODE ###

a,b,c=input().strip().split()

if a[-1]==b[0] and b[-1]==c[0]:
  print("YES")
else:
  print("NO")
from scipy.special import comb
from collections import Counter

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

count = Counter(A)
combs = {k:comb(count[k], 2) for k in count.keys()}
all = sum(combs.values())

for a in A:
    ans = all - combs[a] + comb(count[a]-1,2)
    print(int(ans))


### FIXED CODE ###

from scipy.special import comb
from collections import Counter

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

count = Counter(A)
combs = {k:comb(count[k], 2) for k in count.keys()}
combs_minas_one = {k:comb(count[k]-1, 2) for k in count.keys()}
all = sum(combs.values())

for a in A:
    ans = all - combs[a] + combs_minas_one[a]
    print(int(ans))
A,B,X = map (int,input().split())
if A+B>=X and not A>X :
	print "YES"
else:
	print "NO"

### FIXED CODE ###

A,B,X = map (int,input().split())
if A+B>=X and not A>X :
	print ('YES')
else:
	print ('NO')
a, b = map(int, input().split())
if (a + b) % 2 != 0:
  print("IMPOSSIBLE")
elif:
  print((a + b) // 2)

### FIXED CODE ###

a, b = map(int, input().split())
if (a + b) % 2 != 0:
  print("IMPOSSIBLE")
else:
  print((a + b) // 2)
import sys
a,b=map(int, input().split())

if a-b > a+b:
    elif a-b > a*b:
        print(a-b)
    else:
        print(a*b)
elif a*b > a+b:
    elif a*b > a-b:
        print(a*b)
    else:
        print(a-b)

    

### FIXED CODE ###

import sys
a,b=map(int, input().split())

if a-b > a+b:
    if a-b > a*b:
        print(a-b)
    else:
        print(a*b)
elif a*b > a+b:
    if a*b > a-b:
        print(a*b)
    else:
        print(a-b)
else:
    print(a+b)
# -*- coding: utf-8 -*-
import sys
sys.setrecursionlimit(10**6)
readline = sys.stdin.buffer.readline


def read_int():
    return int(readline())


def read_int_n():
    return list(map(int, readline().split()))


def f(c1, c2, c3):
    if memo[c1][c2][c3] != -1:
        return memo[c1][c2][c3]
    if min(c1, c2, c3) < 0:
        return 0
    c0 = N - (c1 + c2 + c3)
    p0 = c0 / N
    ip0 = 1 - p0
    ret = 1 / ip0
    p1 = c1 / N
    ret += f(c1-1, c2, c3) * p1 / ip0
    p2 = c2 / N
    ret += f(c1+1, c2-1, c3) * p2 / ip0
    p3 = c3 / N
    ret += f(c1, c2+1, c3-1) * p3 / ip0
    memo[c1][c2][c3] = ret
    return ret


N = read_int()
A = read_int_n()
memo = [[[-1] * (N + 1) for _ in range(N + 1)] for _ in range(N + 1)]
memo[0][0][0] = 0
print(f(A.count(1), A.count(2), A.count(3)))


### FIXED CODE ###

# -*- coding: utf-8 -*-
import sys
sys.setrecursionlimit(10**6)
readline = sys.stdin.buffer.readline


def read_int():
    return int(readline())


def read_int_n():
    return list(map(int, readline().split()))


def f(c1, c2, c3):
    if memo[c1][c2][c3] != -1:
        return memo[c1][c2][c3]
    c0 = N - (c1 + c2 + c3)
    p0 = c0 / N
    ip0 = 1 - p0
    ret = 1 / ip0
    if c1 > 0:
        p1 = c1 / N
        ret += f(c1-1, c2, c3) * p1 / ip0
    if c2 > 0:
        p2 = c2 / N
        ret += f(c1+1, c2-1, c3) * p2 / ip0
    if c3 > 0:
        p3 = c3 / N
        ret += f(c1, c2+1, c3-1) * p3 / ip0
    memo[c1][c2][c3] = ret
    return ret


N = read_int()
A = read_int_n()
memo = [[[-1] * (N + 1) for _ in range(N + 1)] for _ in range(N + 1)]
memo[0][0][0] = 0
print(f(A.count(1), A.count(2), A.count(3)))
a,b,k = map(int,input().split())
cnt = 0
for i in range(1,100):
  if a%i ==0 and b%i==0:
    cnt +=1
    if cnt = k:
      print(i)
  

### FIXED CODE ###

a,b,k = map(int,input().split())
cnt = 0
for i in range(100,0,-1):
  if a%i ==0 and b%i==0:
    cnt +=1
    if cnt == k:
      print(i)
A, B = map(int, input().split())

import math

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


### FIXED CODE ###

A, B = map(int, input().split())
 
import fractions
 
ans = A * B / fractions.gcd(A, B)
print(int(ans))
n, k = map(int,input().split())

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

for i in range(n-k):
    if p[i] < p[i+k]:
        ans = p[i+1:k+i+1]
        
ans = sum(ans)
ans = (ans+k)/2

print(ans)


### FIXED CODE ###

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

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

a = 0

for i in range(k):
    a += p[i]

ans = a

for i in range(n-k):
    a -= p[i]
    a += p[i+k]
    if a > ans:
        ans = a

ans = (ans+k)/2

print(ans)
def main():
    
    d,n = map(int, input().split())
    a_list = []
    ans = 0
    if d == 0:
        for i in range(1,100):
            a_list.append(i)
    elif d == 1:
        for i in range(100, 10000, 100):
            a_list.append(i)
    else:
        for i in range(10000, 1000000, 10000):
            a_list.append(i)

    print(a_list[n-1])
    
if __name__ == "__main__":
    main()

### FIXED CODE ###

d,n = map(int,input().split())
li = []
for i in range(1,102):
    if i != 100:
        li.append(i*100**d)
print(li[n-1])
MAXN = 10
MAXV = (MAXN * (MAXN - 1)) // 2
to = [[] for _ in range(MAXV)]
ID = [[-1] * MAXN for _ in range(MAXN)]

def toID(i, j):
    if i > j:
        i, j = j, i
    return ID[i][j]

visited = [False] * MAXV
calculated = [False] * MAXV
dp = [0] * MAXV
def dfs(v):
    if visited[v]: #すでに訪れたことがある時
        if not calculated[v]: #計算されたことがない時 = ループがある
            return -1
        return dp[v]
    visited[v] = True
    dp[v] = 1
    for u in to[v]:
        res = dfs(u)
        if res == -1:
            return -1
        dp[v] = max(dp[v], res + 1)
    calculated[v] = True
    return dp[v]

def main():
    N = int(input())
    a = [list(map(lambda x: int(x) - 1, input().split())) for _ in range(N)]

    V = 0 #頂点の数
    for i in range(N - 1):
        for j in range(i + 1, N):
            ID[i][j] = V
            V += 1
    
    for i in range(N):
        for j in range(N - 1):
            a[i][j] = toID(i, a[i][j]) #対戦相手で管理していたのを試合番号に変える
        for j in range(N - 2):
            to[a[i][j + 1]].append(a[i][j])
    
    # import numpy as np
    # print (np.array(to))
    # print (np.array(ID))

    ans = 0
    for i in range(V):
        res = dfs(i)
        if res == -1:
            print (-1)
            return 0
        ans = max(ans, res)
    print (ans)
    return 0

if __name__ == '__main__':
    main()

### FIXED CODE ###

import sys
input = sys.stdin.readline
from collections import deque

N = int(input())
A = [list(reversed(list(map(lambda x: int(x) - 1, input().split())))) for _ in range(N)]
B = {i: row for i, row in enumerate(A)}

# print (A)
# print (B)

end = 0

for k in range(8000):
    used = set()
    dels = []
    for i, q in B.items():
        if not q:
            continue
        if i in used:
            continue
        j = q[-1]
        if j in used:
            continue
        if A[j][-1] == i:
            A[j].pop()
            A[i].pop()
            used.add(i)
            used.add(j)
            if not A[i]:
                end += 1
                dels.append(i)
            if not A[j]:
                end += 1
                dels.append(j)
    if not used:
        print (-1)
        exit()
    
    if end == N:
        print (k + 1)
        exit()
    
    for i in dels:
        del B[i]
        
print (N * (N - 1) // 2)
import random

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

limit = 0
if N == K:
    anslist = [str(S) for i in range(N)]
    ansString = anslist.join(anslist)
    print(ansString)
    exit()

else:
    if S%2 == 0:
        anslist = [str(S//2) for i in range(K+1)]
        for i in range(N - len(anslist)):
            ramdam = 0
            while(True):
                ramdam = random.randint(1, 10**9)
                if not ramdam == S:
                    break
            anslist.append(str(ramdam))
        print(" ".join(anslist))
    else:
        anslist = []
        t = 1
        for i in range(K-1):
            item = [str(t),str(S-t)]
            anslist.extend(item)
            t += 1
        anslist.append(str(S))
        for i in range(N - len(anslist)):
            ramdam = 0
            while(True):
                ramdam = random.randint(1, 10**9)
                if not ramdam == S:
                    break
            anslist.append(str(ramdam))
        print(" ".join(anslist))


### FIXED CODE ###

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

anslist = []

if S < 10**9:
    for i in range(K):
        anslist.append(S)
    for i in range(N-K):
        anslist.append(S+1)
elif S == 10**9:
    for i in range(K):
        anslist.append(S)
    for i in range(N-K):
        anslist.append(1)

ansString = [str(i) for i in anslist]

print(" ".join(ansString))
import sys
import os
import math
import string

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

lcm = lambda x, y: int(x * y / math.gcd(x, y))

MOD = 10 ** 9 + 7


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    A, B, C, D = il()
    MX = B - A + 1

    ret = 0
    ret += B // C
    ret += B // D
    ret -= (A - 1) // C
    ret -= (A - 1) // D
    ret -= B // lcm(C, D)
    ret += (A - 1) // lcm(C, D)
    # print(int(MX - ret))

    MX -= B // C
    MX -= B // D
    MX += (A - 1) // C
    MX += (A - 1) // D
    MX += B // lcm(C, D)
    MX -= (A - 1) // lcm(C, D)
    print(int(MX))


if __name__ == '__main__':
    main()


### FIXED CODE ###

import sys
import os
import fractions

MOD = 10 ** 9 + 7


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


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    A, B, C, D = list(map(int, sys.stdin.readline().split()))
    E = B - A + 1

    ret = 0
    ret += B // C
    ret += B // D
    ret -= (A - 1) // C
    ret -= (A - 1) // D
    ret -= B // lcm(C, D)
    ret += (A-1) // lcm(C, D)
    print(E - ret)


if __name__ == '__main__':
    main()
import math
from decimal import Decimal
 
n = int(input())
 
if n == 0:
  print(':(')
else:
  for i in range(1, n):
    if math.floor(Decimal(str(i)) * Decimal("1.08")+0.000001) == n:
      print(i)
      break
  else:
    print(':(')

### FIXED CODE ###

n = int(input())
 
ans = -1
for i in range(1, n+1):
  if int(i  * 1.08) == n:
    ans = i
if ans == -1:
  print(':(')
else:
  print(ans)
import math


def sieve_of_eratosthenes(n):
    max_prime = int(math.sqrt(n))
    targets = [i for i in range(2, n + 1)]
    primes = []
    while targets[0] <= max_prime:
        p = targets[0]
        primes.append(p)
        targets = [i for i in targets if i % p != 0]
    primes.extend(targets)
    return primes


n = int(input())
p = sieve_of_eratosthenes(n)
ans = 1
for i in p:
    cnt = 0
    for j in range(2, n + 1):
        while j % i == 0:
            j //= i
            cnt += 1
    ans *= cnt + 1
    ans %= 10 ** 9 + 7
print(ans)

### FIXED CODE ###

import math


def sieve_of_eratosthenes(n):
    max_prime = int(math.sqrt(n))
    targets = [i for i in range(2, n + 1)]
    primes = []
    if n == 1:
        return primes
    while targets[0] <= max_prime:
        p = targets[0]
        primes.append(p)
        targets = [i for i in targets if i % p != 0]
    primes.extend(targets)
    return primes


n = int(input())
p = sieve_of_eratosthenes(n)
ans = 1
for i in p:
    cnt = 0
    for j in range(2, n + 1):
        while j % i == 0:
            j //= i
            cnt += 1
    ans *= cnt + 1
    ans %= 10 ** 9 + 7
print(ans)
s = input()
prin(s.replace(","," ")

### FIXED CODE ###

s = input().replace(","," ")
print(s)
n,k=map(int,input().split())
dp=[[0 for i in range(k+1)] for j in range(n+1)]
a=n-r
if r>=a:
  r=a
for i in range(n+1):
  dp[i][0]=1
dp[1][1]=1
for i in range(2,n+1):
  for j in range(1,k+1):
    dp[i][j]=dp[i-1][j-1]+dp[i-1][j]
for i in range(1,k+1):
  ans=dp[n-k+1][i]*dp[k-1][i-1]
  while ans>10**9+7:
    ans%=10**9+7
  print(ans)

### FIXED CODE ###

n,k=map(int,input().split())
dp=[[0 for i in range(k+1)] for j in range(n+1)]
for i in range(n+1):
  dp[i][0]=1
dp[1][1]=1
for i in range(2,n+1):
  for j in range(1,k+1):
    dp[i][j]=dp[i-1][j-1]+dp[i-1][j]
for i in range(1,k+1):
  ans=dp[n-k+1][i]*dp[k-1][i-1]
  while ans>10**9+7:
    ans%=10**9+7
  print(ans)