Harryxun/stf_run huggingface dataset:
from fractions import math

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

print(a * b // math.gcd(a, b))

### FIXED CODE ###

from fractions import gcd

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

print(a * b // gcd(a, b))
N, a, b = map(int, input().split())

def cmb(n, r, mod):
    if ( r<0 or r>n ):
        return 0
    r = min(r, n-r)
    return g1[n] * g2[r] * g2[n-r] % mod

mod = 10**9+7 #出力の制限
X = 2 * (10**5)
g1 = [1, 1] # 元テーブル
g2 = [1, 1] #逆元テーブル
inverse = [0, 1] #逆元テーブル計算用テーブル

for i in range( 2, X + 1 ):
    g1.append( ( g1[-1] * i ) % mod )
    inverse.append( ( -inverse[mod % i] * (mod//i) ) % mod )
    g2.append( (g2[-1] * inverse[-1]) % mod )

ax = cmb(N, a, mod)
bx = cmb(N, b, mod)

print((pow(2, N) - ax - bx - 1)%mod)

### FIXED CODE ###

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

MOD = 10**9+7

def modcmb(n, r, m):
    x = 1
    y = n
    for i in range(2,r+1):
        x *= i
        x %= MOD
        y *= n-i+1
        y %= MOD
    return y * pow(x, m-2, m) % m

ans = pow(2, N, MOD) - modcmb(N, a, MOD) - modcmb(N, b, MOD) - 1
print(ans % MOD)
N=int(input())
a=input().split()
alice=0
bob=0
while len(a) !=0:
  alice+=max(a)
  a.remove(max(a))
  bob+=max(a)
  a.remove(max(a))
print(alice-bob)

### FIXED CODE ###

N=int(input())
a = list(map(int, input().split()))
a.sort(reverse=True)
S=0
for i in range(N):
  if i%2==0:
    S+=a[i]
  else:
    S-=a[i]
print(S)
from collections import defaultdict,deque
import sys,heapq,bisect,math,itertools,string,queue,datetime
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 998244353
eps = 10**-7
def inp(): return int(input())
def inpl(): return list(map(int, input().split()))
def inpls(): return list(input().split())

K,N = inpl()
MAX = K+N+10
fac = [1]*(MAX+1)
for i in range(1,MAX+1):
	fac[i] = (fac[i-1]*i)%mod

gyakugen = [1]*(MAX+1)
gyakugen[MAX] = pow(fac[MAX],mod-2,mod)
for i in range(MAX,0,-1):
	gyakugen[i-1] = (gyakugen[i]*i)%mod

def Comb(n,k):#nCk
	return (fac[n]*gyakugen[k]*gyakugen[n-k])%mod

#K=k,N=n,0pair = 0
def calc(k,n,i):
	#i=2に帰着させる
	pairs = (i-2)//2
	k -= pairs
	n -= pairs

	#色々と例外処理
	if n < 0 or k <= 0:
		return 0
	elif k == 1 and n >= 2:
		return 0

	if n == 0: 	 #球が0個なら1通り
		ans = 1
	elif n == 1: #球が1個ならそれぞれ1個ずつ入れてn通り
		ans = n 
	else:
		ans = 0
		#i=2の時の数え上げ
		for x in range(2):
			ball = n-x	#球
			box = k-1	#箱
			ans += Comb(box-1+ball,ball)%mod
			
	ans *= pow(2,x,mod)	#0pairの選び方
	return ans % mod

ans = []
for i in range(2,K+2):
	if i%2 == 0:
		pairs = (i-2)//2
		tmp = 0
		for p0 in range(pairs+1): #p0 = 0pairの数
			tmp += calc(K-p0*2,N,i-p0*2)*Comb(pairs,p0)%mod
			tmp %= mod
	ans.append(tmp)
	print(tmp)

ans = ans[::-1]
for i in range(1,K):
	print(ans[i])


### FIXED CODE ###

from collections import defaultdict,deque
import sys,heapq,bisect,math,itertools,string,queue,datetime
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 998244353
eps = 10**-7
def inp(): return int(input())
def inpl(): return list(map(int, input().split()))
def inpls(): return list(input().split())

K,N = inpl()
MAX = K+N+10
fac = [1]*(MAX+1)
for i in range(1,MAX+1):
	fac[i] = (fac[i-1]*i)%mod

gyakugen = [1]*(MAX+1)
gyakugen[MAX] = pow(fac[MAX],mod-2,mod)
for i in range(MAX,0,-1):
	gyakugen[i-1] = (gyakugen[i]*i)%mod

def Comb(n,k):#nCk
	return (fac[n]*gyakugen[k]*gyakugen[n-k])%mod

#K=k,N=n,0pair = 0
def calc(k,n,i):
	x = (i-2)//2
	k -= x
	n -= x
	if k == 1:
		if n <= 1:
			return n
		else:
			return 0
	elif n == 0:
		return pow(2,x,mod)
	elif n < 0 or k <= 0:
		return 0

	tmp = 0
	for j in range(2):
		zb = n-j
		zm = k-2
		tmp += Comb(zb+zm,zb)%mod
	tmp %= mod
	tmp *= pow(2,x,mod)
	return tmp

ans = []
for i in range(2,K+2):
	if i%2 == 0:
		pairs = (i-2)//2
		tmp = 0
		for p0 in range(pairs+1):
			tmp += calc(K-p0*2,N,i-p0*2)*Comb(pairs,p0)%mod
			tmp %= mod
	ans.append(tmp)
	print(tmp)

ans = ans[::-1]
for i in range(1,K):
	print(ans[i])
N,M=map(int,input().split(' '))

m=[[] for i in range(N)]

for i in range(M):
  x,y=map(int,input().split(' '))
  m[x-1].append(y-1)
  m[y-1].append(x-1)

sign=[0]
signed_map=[-1]*N
signed_map[0]=1
while True:
  signed=sign
  sign=[]
  for s in signed:
    for room in m[s]:#サインされた場所から繋がってるとこを回る
      if signed_map[room]==-1:
        signed_map[room]=s+1
        sign.append(room)
  if sign==[]:break

print('Yes')
for ch in signed_map[1:]:
  print(ch)


### FIXED CODE ###

n=int(input())

if n%10==3:
  print('bon')
elif n%10==0 or n %10 == 1 or n%10 == 6 or n%10 == 8:
  print('pon')
else:
  print('hon')
# -*- coding: utf-8 -*-
from math import sqrt
def inpl(): return map(int, input().split())
Q = int(input())

def check(X, m):
    if X//m > m:
        return True
    else:
        return False

for q in range(Q):
    A, B = inpl()
    if A > B:
        A, B = B, A

    X = A*B
    if X <= 2:
        print(0)
        continue
    elif X == 3:
        print(1)
        continue
    
    L = int(sqrt(X))
    if L*L == X:
        L -= 1

    ok, ng = 1, X+1
    while ng - ok > 1:
        m = (ok+ng)//2
        if check(X-1, m):
            ok = m
        else:
            ng = m
    
    tmp = L + ok
    
    if A == B:
        print(tmp)
    else:
        if A>1 and X-1//(A-1) == B and X-1//A == B-1:
            print(tmp-2)
        elif (X-1)//A == A:
            print(tmp-2)
        else:
            print(tmp-1)

### FIXED CODE ###

# -*- coding: utf-8 -*-
def inpl(): return map(int, input().split())
A, B, C = sorted(list(inpl()))
res = 0
res += (C-B)
A += res
B += res
d, m = divmod(B-A, 2)
res += d+2*m
print(res)
s=[1,2,3]
a,b=map(int,raw_input().split())
s.remove(x)
s.remove(y)
print s[0]

### FIXED CODE ###

a=input()
b=input()
if a==1 and b==2:
  print "3"
elif a==2 and b==3:
  print "1"
elif a==3 and b==1:
  print "2" 
elif a==3 and b==2:
  print "1"
elif a==2 and b==1:
  print "3"
else:
  print "2"
import math
r = input()
circ = 2 * math.pi * r
print(circ)

### FIXED CODE ###

R = int(input())
circumference = 2 * 3.14 * R
print(circumference)
import math
N,Y=map(int,input().split())
YY=min(N,math.floor(Y/10000))
flag=False
for i in reversed(range(YY+1)):
    Y2=Y-i*10000
    N2=N-i
    YYY=min(N2,math.floor(YY2/5000))
    for j in reversed(range(YYY+1)):
        YY3=int((Y2-j*5000)/1000)
        if YY3==N2-j:
            print(str(i),str(j),str(YY3))
            flag=True
            break
        else:
            continue
if flag==False:
    print(str(-1),str(-1),str(-1) )
else:
    exit

### FIXED CODE ###

N,Y=map(int,input().split())
flag=False
for i in range(N+1):
    if flag==True:
        break
    else:
        pass
    for j in range(N+1-i):
        k=N-i-j
        if 10000*i+5000*j+1000*k==Y:
            print(i, j, k)
            flag=True
            break
        else:
            continue
if flag==False:
    print("-1 -1 -1")
else:
    pass
import math
l,r=map(int,input().split())
a=l%2019
b=r%2019
if l-r>=2019:
    print(0)
elif b-a<=0:
    print(0)
elif (a%3==0)&(b%673==0):
    print(0)
elif (a%3==0)&(b%3==0):
    print(0)
elif a<=20&b>=101:
    print(1)
else:
    ans=2018
    for i in range(a,b+1):
        for j in range(i+1,b+1):
            ans=min(ans,i*j%2019)
print(ans)

### FIXED CODE ###

import math
l,r=map(int,input().split())
a=l%2019
b=r%2019
if r-l>=2018:
    print(0)
elif b-a<=0:
    print(0)
else:
    ans=2018
    for i in range(a,b+1):
        for j in range(i+1,b+1):
            ans=min(ans,i*j%2019)
    print(ans)
N, M = map(int, input().split())
A = [int(input()) for _ in range(M)]
mod = 10 ** 9 + 7

B = ['.'] * (N + 1) 
for a in A:
    B[a] = '#'
    
dp = [0] * (N + 1)
dp[1] = 1
dp[2] = 2
for i in range(3, N + 1):
    if B[i] == '.':
        dp[i] = (dp[i - 2] + dp[i - 1]) % mod
    
print(dp[N])

### FIXED CODE ###

import sys
N, M = map(int, input().split())
A = [int(input()) for _ in range(M)]
mod = 10 ** 9 + 7

if N == 1:
    print(1)
    sys.exit()

B = ['.'] * (N + 1) 
for a in A:
    B[a] = '#'
    
dp = [0] * (N + 1)
if B[1] == '.' and B[2] == '.':
    dp[1] = 1
    dp[2] = 2
elif B[1] == '#' and B[2] == '.':
    dp[2] = 1
elif B[1] == '.' and B[2] == '#':
    dp[1] = 1
    
for i in range(3, N + 1):
    if B[i] == '.':
        dp[i] = (dp[i - 2] + dp[i - 1]) % mod
    
print(dp[N])
import sys
from collections import defaultdict
from math import gcd

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

MOD = 10**9 + 7
P = 2 ** 127 - 1

N = int(readline())
m = map(int, read().split())
A, B = zip(*zip(m, m))

pow2 = [1] * (N + 10)
for n in range(1, N + 10):
    pow2[n] = pow2[n - 1] * 2 % MOD

def to_standard_form(a, b):
    if a == 0:
        return -1, 0
    x = pow(a, P-2, P) * b % P
    return x

def pair_key(key):
    if key == -1:
        return 0
    if key == 0:
        return -1
    return P - pow(key, P-2, P)

counter = defaultdict(int)
origin = 0
for a, b in zip(A, B):
    if a == b == 0:
        origin += 1
        continue
    key = to_standard_form(a, b)
    counter[key] += 1
    counter[pair_key(key)] += 0

answer = origin
k = 1

for key, cnt in counter.items():
    key1 = pair_key(key)
    if key < key1:
        x, y = cnt, counter[key1]
        k *= pow(2, x, MOD) + pow(2, y, MOD) - 1
        k %= MOD

answer += k - 1
answer %= MOD
print(answer)


### FIXED CODE ###

import sys
from collections import defaultdict
from math import gcd

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

MOD = 10**9 + 7

N = int(readline())
m = map(int, read().split())
A, B = zip(*zip(m, m))

pow2 = [1] * (N + 10)
for n in range(1, N + 10):
    pow2[n] = pow2[n - 1] * 2 % MOD

def to_standard_form(a, b):
    if a == 0:
        return (0, 1)
    g = gcd(a, b)
    a //= g
    b //= g
    if a < 0:
        return (-a, -b)
    return (a, b)

counter0 = defaultdict(int)
counter1 = defaultdict(int)
origin = 0
for a, b in zip(A, B):
    if a == b == 0:
        origin += 1
        continue
    a, b = to_standard_form(a, b)
    if b <= 0:
        counter0[(a, b)] += 1
    else:
        counter1[(b, -a)] += 1
        counter0[(b, -a)] += 0

answer = origin
k = 1
for key, cnt0 in counter0.items():
    cnt1 = counter1[key]
    x = pow2[cnt0] + pow2[cnt1]
    k = k * (x - 1) % MOD

answer += k - 1
answer %= MOD
print(answer)
#

import sys
input=sys.stdin.readline

def main():
    x,y,z=map(int.input().split())
    print(z,x,y)
    
    
    
if __name__=="__main__":
    main()


### FIXED CODE ###

#

import sys
input=sys.stdin.readline

def main():
    x,y,z=map(int,input().split())
    print(z,x,y)
    
    
    
if __name__=="__main__":
    main()
import sys

n = int(input())
a = [int(x) for x in input().split()]
if n==1:
    print(1)
    sys.exit()
li = [0]*(10**3+1)
lcm = 1
for k in range(n):
    z = a[k]
    for i in range(2,int(z**0.5)+1):
        x = 0
        while z%i==0:
            x += 1
            z//=i
        if li[i]<x:
            if li[i]==0:
                li[i] = x
            else:
                lcm //= ((-1)*li[i])
                li[i] = x
    if z!=1 and li[z]==0:
        li[z] = -z
        lcm *= z

for i in range(2,10**3+1):
    if li[i]>0:
        lcm *= i*li[i]

mod = 10**9+7
ans = 0
for i in range(n):
    ans = (ans + lcm//a[i])%mod
print(ans)

### FIXED CODE ###

import sys

n = int(input())
a = [int(x) for x in input().split()]
am = max(a)
mod = 10**9+7
if n==1:
    print(1)
    sys.exit()
li = [0]*(am+1)
lcm = 1
for k in range(n):
    z = a[k]
    for i in range(2,int(z**0.5)+1):
        x = 0
        while z%i==0:
            x += 1
            z//=i
        li[i] = max(li[i],x)
    if z!=1 and li[z]==0:
        li[z] = 1

for i in range(2,am+1):
    if li[i]>0:
        lcm = lcm * i**li[i] % mod

ans = 0
for i in range(n):
    m = pow(a[i],mod-2,mod)
    ans = (ans+(lcm*m)%mod)%mod
print(ans%mod)
import math
a,b,c=map(int,input().split())
print(max(a+b,a-b,a*b))

### FIXED CODE ###

import math
a,b=map(int,input().split())
print(max(a+b,a-b,a*b))
def judge():
    count = 0
    flag = True
    for _ in range(n):
        d1, d2 = map(int, input().split(" "))
        if d1 == d2:
            count += 1
        else:
            count = 0
        
        
        if count == 3:
            print("yes")
            flag = True
            break
        else:
            flag = False
            pass
    return flag

if judge():
    print("yes")
else:
    print("no")


### FIXED CODE ###

def judge():
    cnt = 0  # 今何連続でゾロ目が出ているか記録しておきます

    for _ in range(N):
        x, y = map(int, input().split())
        if x == y:
            # ゾロ目ストリークが1増えました
            cnt += 1
        else:
            # ゾロ目ストリークが切れました
            cnt = 0

        if cnt == 3:
            # 3連続になった瞬間、return True していいです
            return True

    # ダメでした
    return False

N = int(input())

if judge():
    # judge() で Trueが返ってくるとこっちに進みます
    print("Yes")
else:
    # Falseだとこっちです
    print("No")
N=int(input())
DP=[0]*(N+1)
DP[3]=1
tmp=0
mod=10**9+7
for i in range(4,N+1):
   DP[i]=(DP[i-1]+DP[i-3])%mod
print(DP[N]%mod)

### FIXED CODE ###

N=int(input())
DP=[0]*(N+1)
tmp=0
mod=10**9+7
if N<3:
   print(0)
   exit()
DP[3]=1
for i in range(4,N+1):
   DP[i]=(DP[i-1]+DP[i-3])%mod
print(DP[N]%mod)
n = int(input())
ans = [0 for i in range(1000)]
for x in range(1, 100):
    for y in range(1, 100):
        for z in range(1, 100):
            if x*x+y*y+z*z+x*y+y*z+z*x < 1000:
                ans[x*x+y*y+z*z+x*y+y*z+z*x] += 1

for i in range(n):
    print(ans[i])


### FIXED CODE ###

n = int(input())
ans = [0 for i in range(10100)]
for x in range(1, 101):
    for y in range(1, 101):
        for z in range(1, 101):
            if x*x+y*y+z*z+x*y+y*z+z*x < 10001:
                ans[x*x+y*y+z*z+x*y+y*z+z*x-1] += 1

for i in range(n):
    print(ans[i])
S = input()

for c in string.lowercase :
    if c not in S :
        continue

    X = S.split(c)
    ans = 0
    for str in X :
        ans = max(ans, len(str))

print(ans)

### FIXED CODE ###

S = input()
chars = set(S)
ans = len(S)

for c in chars :
    m = max(len(_) for _ in S.split(c))
    ans = min(ans, m)

print(ans)
from collections import Counter as C

S = input()

c = C(S)
if len(c.keys())==2:
  if c.values[0]==2:
    print("Yes")
  else:
    print("No")
else:
  print("No")

### FIXED CODE ###

from collections import Counter as C
 
S = input()
 
c = C(S)
if len(c.keys())==2:
  if list(c.values())[0]==2:
    print("Yes")
  else:
    print("No")
else:
  print("No")
n= int(input())
k = int(input())
z = 1
for i in range(n):
  if z < k:
    z = 2*Z
  else:
    z = z+k
print(z)

### FIXED CODE ###

n= int(input())
k = int(input())
z = 1
for i in range(n):
  if z < k:
    z = 2*z
  else:
    z = z+k
print(z)
a, b, c, x = map(int, [input() for i in range(4)])
count = 0
for i in range(a + 1):
    if 500 * i == x:
        count += 1
        break
    else if 500 * i > x:
        break
    else:
        for j in range(b + 1):
            if 500 * i + 100 * j == x:
                count += 1
                break
            else if 500 * i + 100 * j > x:
                break
            else:
                for k in range(c + 1):
                    if 500 * i + 100 * j + 50 * k == x:
                        count += 1
                        break
print(count)

### FIXED CODE ###

a, b, c, x = map(int, [input() for i in range(4)])
count = 0
for i in range(a + 1):
    for j in range(b + 1):
        for k in range(c + 1):
            if 500 * i + 100 * j + 50 * k == x:
                count += 1
print(count)
#1:初期化
N, K = map(int,input().split())
h = list(map(int, input().split()))
inf = float("inf")
dp = [inf]*(N) #Kが100までなので余分に入れて安全！

#2:初期値
dp[0] = 0

#3:dp実行部(配るDP)
for i in range(N):
    for k in range(1,min(N-i-1,K)+1):
        dp[i+k] = min(dp[i+k], dp[i] + abs(h[i] - h[i+k]))
        #print(dp,i,k)

#4:出力
print(dp[N-1])


### FIXED CODE ###

#1:初期化
N = int(input())
h = list(map(int, input().split()))
inf = float("inf")
dp = [inf]*(N)

#2:初期値
dp[0] = 0

#3:dp実行部
for i in range(1,N):
    dp[i] = min(dp[i], dp[i-1] + abs(h[i] - h[i-1]))
    if(i>1): #2つ目の足場には二個前の足場がないので．
        dp[i] = min(dp[i], dp[i-2] + abs(h[i] - h[i-2]))

#4:出力
print(dp[N-1])
mod = 10**9+7

n = int(input())
a = sorted(f())
if n&1:
    if all([a[i] == i+i%2 for i in range(n)]):
        print(1<<((n-1)//2)%mod)
    else:
        print(0)
else:
    if all([a[i] == i+(i+1)%2 for i in range(n)]):
        print(1<<(n//2)%mod)
    else:
        print(0)

### FIXED CODE ###

f = lambda: list(map(int,input().split()))
mod = 10**9+7

n = int(input())
a = sorted(f())
if n&1:
    if all([a[i] == i+i%2 for i in range(n)]):
        print(2**(n//2)%mod)
    else:
        print(0)
else:
    if all([a[i] == i+(i+1)%2 for i in range(n)]):
        print(2**(n//2)%mod)
    else:
        print(0)
N=int(input())
AB=[]
for i in range(N):
    AB.append(list(map(int,input().split())))
a=AB[0][1]
for i in range(N-1):
    if AB[i+1][1]<AB[i][1]:
        a=AB[i+1][1]
        b=i+1
print(a+AB[b][0])

### FIXED CODE ###

N=int(input())
AB=[]
for i in range(N):
    AB.append(list(map(int,input().split())))
a=AB[0][1]
b=0
for i in range(1,N):
    if AB[i][1]<a:
        a=AB[i][1]
        b=i
print(a+AB[b][0])
x,n = map(int,input().split())
if n:
    p = set(map(int,input().split()))
mini = float('inf')
ans = float('inf')
for i in range(-400,400):
    if i not in p:
        if abs(x-i)<mini:
            mini = abs(x-i)
            ans = i
        elif abs(x-i)==mini and ans>i:
            ans=i
print(ans)

### FIXED CODE ###

x,n = map(int,input().split())
p = set()
if n:
    p = set(map(int,input().split()))
mini = float('inf')
ans = float('inf')
for i in range(-400,400):
    if i not in p:
        if abs(x-i)<mini:
            mini = abs(x-i)
            ans = i
        elif abs(x-i)==mini and ans>i:
            ans=i
print(ans)
a

### FIXED CODE ###

n, m = map(int, input().split())
x = list(map(int, input().split()))

if m <= n:
    print(0)
else:
    x.sort()
    diff = []#i番目とi+1番目の距離
    for i in range(m-1):
        diff.append(x[i+1] - x[i])
    diff.sort(reverse=True)
    # print(diff)
    if n > 1:
        for i in range(n-1):
            diff.pop(0)
    # print(diff)
    print(sum(diff))
N, K = list(map(int, input().split()))
h_l = [0]*100000
i = 0
for i in range(N):
    x = int(input())
    h_l[i] = x
    x = 0
j = 0
min = 1000000000
h_list = [j for j in h_l if h_l[j] == 0]
h_list.sort()
y = 0
q = 0
while q < N-K+1:
    y = h_list[q + K - 1] - h_list[q]
    if y < min:
        min = y
        y = 0
    else:
        y = 0
    q += 1
print(min)


### FIXED CODE ###

N, K = list(map(int, input().split()))
# print(N)
# print(K)
h_list = [0]*100000
i = 0
for i in range(N):
    x = int(input())
    h_list[i] = x
    x = 0
j = 0
min = 1000000000
for i in range(100000 - N):
    h_list.remove(0)
# print(h_list)
h_list.sort()
# print(h_list)
y = 0
q = 0
while q < N-K+1:
    y = h_list[q + K-1] - h_list[q]
#    print(q)
#    print(h_list[q+K-1], h_list[q])
    if y < min:
        min = y
        y = 0
    else:
        y = 0
    q += 1
print(min)
n,m=map(int,input().split())
a=list(map(int,input().split()))

count=0
sum=0

for i in a:
  sum+=i
  
for i in a:
  if a>=(sum/4*m):
    count+=1

if count>=m:
  print('Yes')
else:
  print('No')

### FIXED CODE ###

n,m=map(int,input().split())
a=list(map(int,input().split()))
a.sort(reverse=True)
s=0
b=True
for i in a:
  s+=i

  
for i in range(0,m):
  if a[i]>=s/4/m:
    b=True
  else:
    b=False
    
if b:
  print('Yes')
else:
  print('No')
a, b, c, d = map(int, input().split())
i, j = c, d
def gcd(i, j):
    return i if j == 0 else GCD(j, i%j)
lcm = int(c//gcd(c, d)*d)

def cont(x):
    cnt1 = x//c 
    cnt2 = x//d
    ans = x - cnt1 - cnt2 + x//lcm
    return int(ans)

print(cont(b) - cont(a-1))

### FIXED CODE ###

a, b, c, d = map(int, input().split())
i, j = c, d
def gcd(i, j):
    return i if j == 0 else gcd(j, i%j)
lcm = int(c//gcd(c, d)*d)

def cont(x):
    cnt1 = x//c 
    cnt2 = x//d
    ans = x - cnt1 - cnt2 + x//lcm
    return int(ans)

print(cont(b) - cont(a-1))
a,b,c,d = map(int,input().split())
for i in range(100):
    if c-b <= 0:
        print("yes")
        break
    elif  a-d <= 0:
        print("No")
        break
    else:
        a = a-d
        c = c-b

### FIXED CODE ###

s,w = map(int,input().split())
if s <= w:
    print("unsafe")
else:
    print("safe")
import numpy as np

n = int(input())
a = np.array(list(map(int, input().split())))

arr = np.arange(n) + 1
diff = a - arr

diff.sort()

diff -= np.median(diff)

print(int(np.abs(diff).sum()))

### FIXED CODE ###

import sys
import numpy as np
n = int(input())
arr = np.array(list(map(int, input().split())))

comp = np.arange(n) + 1
diff = arr - comp

diff.sort()

diff = diff - np.median(diff)

print(int(np.abs(diff).sum()))
n = int(input())
p = list(map(int,input().split()))
N = list(range(1,n+1))
for i in N:
  if N[i-1] != p[i-1]:
    j = i
    break
if N[p[i-1]] == p[i-1]:
  print("YES")
else:
  print("NO")

### FIXED CODE ###

n = int(input())
p = list(map(int,input().split()))
N = list(range(1,n+1))
c = []
a = 0
for i in N:
  if N[i-1] != p[i-1]:
    a += 1
if a == 2 or a==0:
  print("YES")
else:
  print("NO")
from sys import stdin
N,M = [int(x) for x in stdin.readline().rstrip().split()]
students = []
for _ in range(N):
    students.append([int(x) for x in stdin.readline().rstrip().split()])

checkpoints = []
for _ in range(M):
    checkpoints.append([int(x) for x in stdin.readline().rstrip().split()])

for i in students:
    tmp = 10000 
    for ind,j in enumerate(checkpoints):
        dist = abs(i[0] - j[0]) + abs(i[1] - j[1])
        if dist < tmp:
            tmp = dist
            ans = ind+1
    print(ans)

### FIXED CODE ###

from sys import stdin
N,M = [int(x) for x in stdin.readline().rstrip().split()]
students = []
for _ in range(N):
    students.append([int(x) for x in stdin.readline().rstrip().split()])

checkpoints = []
for _ in range(M):
    checkpoints.append([int(x) for x in stdin.readline().rstrip().split()])

for i in students:
    tmp = 10**9 
    for ind,j in enumerate(checkpoints):
        dist = abs(i[0] - j[0]) + abs(i[1] - j[1])
        if dist < tmp:
            tmp = dist
            ans = ind+1
    print(ans)
N, K = map(int,input().split())
h = sorted(int(input()) for _ in range(N))

ans = 1e9+7
for i in range(N-K+1):
  ans = min(ans, h[i+K]-h[i])
print(ans)

### FIXED CODE ###

N, K = map(int,input().split())
h = sorted([int(input()) for i in range(N)])
trees = [h[i+K-1] - h[i] for i in range(N-K+1)]
print(min(trees))
import math
data = list(map(int,input().split()))
a = data[0]
b = data[1]
x = data[2]

c = a*a*b/2
d = a*a*b-x
if x>c:
  e = ((d/a)*2)/a
  t = a/e
  print(90-math.degrees(math.atan(t)))
else:
  f = ((x/a)*2)/b
  t = f/b
  print(90-math.degrees(math.atan(t)))

### FIXED CODE ###

import math
data = list(map(int,input().split()))
a = data[0]
b = data[1]
x = data[2]

c = a*a*b/2
d = a*a*b-x
if d==0:
  print(0)
else:
  if x>c:
    e = ((d/a)*2)/a
    t = a/e
    print(90-math.degrees(math.atan(t)))
  else:
    f = ((x/a)*2)/b
    t = f/b
    print(90-math.degrees(math.atan(t)))
mod = 10**9+7
from math import factorial
def comb(n,k):
    return int(factorial(n)/(factorial(n-k)*factorial(k))) % mod

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

if N==K:
    print(1)
    for i in range(K-1):
        print(0)
else:
    for i in range(1,K+1):
        blue=0
        red=0

        if K>=i:
            blue=comb(K-1,i-1)
        for j in [i-1,i,i+1]:
            if N-K>=j and j>0:
                if i!=j:
                    red += comb(N-K-1,j-1)
                else:
                    red += 2*comb(N-K-1,j-1) % mod
        print(blue*red % mod)


### FIXED CODE ###

mod = 10**9+7
from math import factorial

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

def comb(n,k):
    if (k<0 or k>n):
        return 0
    k = min(k,n-k)
    return g1[n]*g2[k]*g2[n-k] % mod

g1 = [1, 1]
g2 = [1, 1]
inverse = [0, 1]

for i in range( 2, N + 1 ):
    g1.append( ( g1[-1] * i ) % mod )
    inverse.append( ( -inverse[mod % i] * (mod//i) ) % mod )
    g2.append( (g2[-1] * inverse[-1]) % mod )

if N==K:
    print(1)
    for i in range(K-1):
        print(0)

else:
    for i in range(1,K+1):
        blue=0
        red=0

        if K>=i:
            blue=comb(K-1,i-1)
        for j in [i-1,i,i+1]:
            if N-K>=j and j>0:
                if i!=j:
                    red += comb(N-K-1,j-1)
                else:
                    red += 2*comb(N-K-1,j-1) % mod
        print(blue*red % mod)