Harryxun/stf_run huggingface dataset:
import math

l, r, c, d = map(int, input().split())
# numbers = [True]*(r+1)


count = 0

first = (l + c - 1)//c 
last = r//c 

count += last - first + 1

first = (l + d - 1)//d 
last = r//d 
count += last - first + 1

lcm = c*d//math.gcd(c, d)

first = (l + lcm - 1)//lcm 
last = r // lcm
count -= last - first + 1


print(r - l - count + 1)

### FIXED CODE ###

from fractions import gcd 
import sys

l, r, c, d = map(int, sys.stdin.readline().split())

count = 0

first = (l + c - 1)//c 
last = r//c 

count += last - first + 1

first = (l + d - 1)//d 
last = r//d 
count += last - first + 1

lcm = c*d//gcd(c, d)

first = (l + lcm - 1)//lcm 
last = r // lcm
count -= last - first + 1


print(r - l - count + 1)
def dfs(cur, visited, dis):
    visited[cur] = 1
    if cur in adj_list:
        for item in adj_list[cur]:
            if not visited[item]:
                dfs(item, visited, dis)
            dis[cur] = max(dis[cur], 1+dis[item])


v, e = map(int, input().split())
adj_list = {}
for _ in range(e):
    x, y = map(int, input().split())
    adj_list.setdefault(x, []).append(y)
visited = [0] * (v + 1)
dis = [0] * (v + 1)
for i in range(v + 1):
    if not visited[i]:
        dfs(i, visited, dis)
print(max(dis))


### FIXED CODE ###

import sys
sys.setrecursionlimit(10**5)

v, e = map(int, input().split())
adj_list = {}
for _ in range(e):
    x, y = map(int, input().split())
    adj_list.setdefault(x, []).append(y)
visited = [0] * (v + 1)
dis = [0] * (v + 1)


def dfs(cur):
    global visited
    global dis
    visited[cur] = 1
    if cur in adj_list:
        for item in adj_list[cur]:
            if not visited[item]:
                dfs(item)
            dis[cur] = max(dis[cur], 1+dis[item])


for i in range(v + 1):
    if not visited[i]:
        dfs(i)
print(max(dis))
while True:
  a,op,b=map(str,raw_input().split())
  a=int(a)
  b=int(b)
  
  if op=='+':
    print a+b
  elif op=='?':
    break
  elif op=='-':
    print a-b
  elif op=='/':
    print a/b
  elif op=='*':
    ptint a*b
    

### FIXED CODE ###

while True:
  a,op,b=map(str,raw_input().split())
  a=int(a)
  b=int(b)
  
  if op=='+':
    print a+b
  elif op=='?':
    break
  elif op=='-':
    print a-b
  elif op=='/':
    print a/b
  elif op=='*':
    print a*b
import bisect,collections,copy,heapq,itertools,math,numpy,string
import sys
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return map(int,sys.stdin.readline().rstrip().split())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())

R = I()
print(2 * math.pi * R)

### FIXED CODE ###

import bisect,collections,copy,heapq,itertools,math,numpy,string
import sys
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return map(int,sys.stdin.readline().rstrip().split())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())

R = I()
print(2 * math.pi * R)
N=int(input())
K=int(input())
X=int(input())
Y=int(input())

if N=<K:
  print(N*X)
else:
  print(K*X + (N-K)*Y)


### FIXED CODE ###

N=int(input())
K=int(input())
X=int(input())
Y=int(input())

if N > K:
  print(K*X+(N-K)*Y)
else:
  print(N*X)
n = int(input())
s = sorted(map,int,input().split())
M = 10 ** 18
ans = 1
for ss in s:
	ans *= ss
	if ans > M:
		ans = -1
		break
	elif ans == 0:
		break
print(ans)

### FIXED CODE ###

n = int(input())
s = sorted(map(int,input().split()))
M = 10 ** 18
ans = 1
for ss in s:
	ans *= ss
	if ans > M:
		ans = -1
		break
	elif ans == 0:
		break
print(ans)
S = input()
if ((S[0] == S[1]) and (S[0] !=S[2]) and (S[2] == S[3]))or
	((S[0] != S[1]) and (S[0] ==S[2]) and (S[1] == S[3]))or
	((S[0] != S[1]) and (S[1] == S[2]) and (S[0] == S[3])):
  print("Yes")
else:
  print("No")
  


### FIXED CODE ###

S = input()
if ((S[0] == S[1]) and (S[0] !=S[2]) and (S[2] == S[3]))or((S[0] != S[1]) and (S[0] ==S[2]) and (S[1] == S[3]))or((S[0] != S[1]) and (S[1] == S[2]) and (S[0] == S[3])):
  print("Yes")
else:
  print("No")
x = input()
y = int(x)
return(y**3)



### FIXED CODE ###

print(int(input())**3)
nums =input().split()
a = int(nume[0])
b = int(nums[1])
if a < b:
     print('a > b')
elif a > b:
     print('a < b')
eles:
     print('a == b')

### FIXED CODE ###

nums = input().split()
a = int(nums[0])
b = int(nums[1])
if a < b:
     print('a < b')
elif a > b:
     print('a > b')
else:
     print('a == b')
n,m,c=map(int,input().split())
b=list(map(int,input().split())
a=[list(map(int,input().split())) for k in range(n)]

count=0

for i in range(n)
       absum=0
       for j in range(m)
       absum +=a[i][j]*b[j]
       
       ans=absum+c
       if ans>0:
       count +=1
print(count)       

### FIXED CODE ###

n,m,c=map(int,input().split())
B=list(map(int,input().split()))
A=[list(map(int,input().split()))for i in range(n)] #二次元配列でとっています
cnt=0
for i in range(n):
    total=0
    for j in range(m):
        total+=B[j]*A[i][j]
    total+=c
    if 0<total:
        cnt+=1
print(cnt)
import sys
#import time
#from collections import deque, Counter, defaultdict
#from fractions import gcd
import bisect
#import heapq
#import math
import itertools
input = sys.stdin.readline
sys.setrecursionlimit(10**8)
inf = 10**18
MOD = 1000000007
ri = lambda : int(input())
rs = lambda : input().strip()
rl = lambda : list(map(int, input().split()))
import numpy as np

n = ri()
a = rl()
a=a+a
a.sort()

a.pop()
ans=0
for i in range(n-1):
    ans+=a[-i-1]
print(ans)

### FIXED CODE ###

import sys
#import time
#from collections import deque, Counter, defaultdict
#from fractions import gcd
import bisect
#import heapq
#import math
import itertools
input = sys.stdin.readline
sys.setrecursionlimit(10**8)
inf = 10**18
MOD = 1000000007
ri = lambda : int(input())
rs = lambda : input().strip()
rl = lambda : list(map(int, input().split()))


n = ri()
a = rl()
a=a+a
a.sort()

a.pop()
ans=0
for i in range(n-1):
    ans+=a[-i-1]
print(ans)
a=int(input())
value=a+(a*a)+(a*a*a*)
print(value)

### FIXED CODE ###

a=int(input())
if(a>=1 and a<=10):
    val=a+(a*a)+(a*a*a)
    print(val)
from heapq import*
import sys;sys.setrecursionlimit(200000)
h,w=map(int,input().split())
grid=[["#"]*(w+2)]+[list("#"+input()+"#") for x in range(h)]+[["#"]*(w+2)]

g=0
x=1
y=1
lock=[]
while 1:
    for x in range(1,h+1):
        for y in range(1,w+1):
            if (y,x) in lock:
                continue
            if grid[y][x]=='#':
                for i,j in([0,1],[1,0],[0,-1],[-1,0]):
                    if grid[y+i][x+j]!="#":
                        grid[y+i][x+j]="#"
                        heappush(lock,(y+i,x+j))
    g+=1
    lock=[]
#    for i in grid:
#        print(*i)
    if all(all(j=="#" for j in i)for i in grid):
        print(g)
        exit()

### FIXED CODE ###

from heapq import*
h,w=map(int,input().split())
grid=[["#"]*(w+2)]+[list("#"+input()+"#")for x in range(h)]+[["#"]*(w+2)]

stack=[]
for y in range(1,h+1):
    for x in range(1,w+1):
        if grid[y][x]=="#":
            grid[y][x]=0
            stack.append((y,x))

for i in range(h*w):
    tmp=[]
    for my,mx in stack:
        for y,x in ([0,1],[1,0],[-1,0],[0,-1]):
            if grid[my+y][mx+x]==".":
                grid[my+y][mx+x]=i+1
                tmp.append([my+y,mx+x])
    stack=tmp
    if len(tmp)==0:
        print(i)
        break
a=[print(s) for s in map(lambda x:x[0]+x[1]==x[2] and 'YES' or 'NO', [sorted(int(x)**2 for x in raw_input().split(' ')) for i in range(int(raw_input()))])]

### FIXED CODE ###

print "\n".join(s for s in map(lambda x:x[0]+x[1]==x[2] and 'YES' or 'NO', [sorted(int(x)**2 for x in raw_input().split(' ')) for i in range(int(raw_input()))]))
a,b = input().split()
c = (a*b)//1
print(c)

### FIXED CODE ###

from decimal import Decimal
a,b = input().split()
c = int(a)*Decimal(b)
print(int(c))
def get_max(n):
    if n==1:
        return 0:
    if n % 2 == 0:
        return n*(n-1)/2
    else:
        return ((n+1)/2+n)*(n+1)/2/2 + get_max((n-1)/2)

def main():
    N = int(input())
    print(int(get_max(N)))


if __name__ == '__main__':
    main()


### FIXED CODE ###

def main():
    N = int(input())
    print(int((N*(N-1))//2))

if __name__ == '__main__':
    main()
def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    # divisors.sort()
    return divisors

N,M = map(int,input().split())
arr = [i for i in make_divisors(M) if i>N]
print(M//min(arr))


### FIXED CODE ###

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    # divisors.sort()
    return divisors

N,M = map(int,input().split())
arr = [i for i in make_divisors(M) if i>=N]
print(M//min(arr))
X = int(input())

for b in range(-100,100):
    result = (X + b**5)**(1/5).real
    if type(result) is complex:
        continue
    if result - round(result) == 0:
        ans_a,ans_b = b,round(result)


print(ans_a,ans_b)
    

### FIXED CODE ###

X = int(input())

for a in range(-120,120):
    for b in range(-120,120):
        if a**5 - b**5 == X:
            ans_a,ans_b = a,b
            break


print(ans_a,ans_b)
s=input()
k=nu()
n=len(s)
z=set()
for i in range(n):
	pp=""
	for j in range(i,n):
		pp+=s[j]
		z.add(pp)
fin=list(z)
fin.sort()
print(fin[k-1])

### FIXED CODE ###

import math as ma
import sys
from sys import exit
from decimal import Decimal as dec
from itertools import permutations


def li():
	return list(map(int , input().split()))


def num():
	return map(int , input().split())


def nu():
	return int(input())


def find_gcd(x , y):
	while (y):
		x , y = y , x % y
	return x


s=input()
k=nu()
n=len(s)
m=k
z=set()
for i in range(n):
	pp=""
	for j in range(i,i+m):
		if(j>=n):
			break
		pp+=s[j]
		z.add(pp)
fin=list(z)
fin.sort()
print(fin[k-1])
# -*- coding: utf-8 -*-
"""
Created on Fri Sep 14 01:10:44 2018

@author: Yuki
"""
def func(n):
    if n == 0 or n == 1:
        return 1
    else:
        return n*func(n-1)

N, M = map(int, input().split())
if abs(N-M) > 1:
    print(0)
elif abs(N-M) == 1:
    A = max(N, M)
    res = func(A)
    print(int(res**2/A))
else:
    print(2*func(N))




### FIXED CODE ###

# -*- coding: utf-8 -*-
"""
Created on Fri Sep 14 01:10:44 2018

@author: Yuki
"""
mod = 1000000000 + 7
def func(n):
    r = 1
    for i in range(1, n+1):
        r *= i
        r %= mod

    return r
N, M = map(int, input().split())
if abs(N-M) > 1:
    print(0)
elif abs(N-M) == 1:
    A = max(N, M)
    print(int((func(A)*func(A-1))%mod))
else:
    print(int(2*func(N)*func(N))%mod)
#C - Guess The Number https://atcoder.jp/contests/abc157/tasks/abc157_c
x,m = map(int, input().split())
s=[-1]*m
c=[-1]*m
num = [-1]*3
ans = 0
for i in range(m):
    s[i], c[i] = map(int, input().split())

for j, l in zip(s, c):
    if num[j-1] == -1:
        num[j-1] = l
    elif num[j-1] != l:
        print(-1)
        break

    #num[j-1]とlが同じときは何もされない
else:
    num = list(map(lambda x: x*0 if x<0 else x, num))
    for k in num:
        ans = ans *10 + k
    if ans != 0 and num>1:
        print(ans)
    else:
        print(-1)

### FIXED CODE ###

x,m = map(int, input().split())
s=[-1]*m
c=[-1]*m
for i in range(m):
    s[i], c[i] = map(int, input().split())
if x ==1:
    start = 0
else:
    start = 10**(x-1)

for j in range(start, 1000):
    num = str(j)
    for k1, k2 in zip(s, c):
        if num[k1-1] != str(k2):
            break
    else:  #すべて一致したとき
        print(j)
        break
else:
    print(-1)
# -*- coding: utf-8 -*-
a = int(input())
b = list(int(input()))
count = list()
for i in range(a):
  count[i-1] = 0
  while b[i-1] % 2 == 0:
    b[i-1] = b[i-1] / 2
    count[i-1] += 1
print(min(count))

### FIXED CODE ###

# -*- coding: utf-8 -*-
a = str(input())
list(a)
count = 0
if a[0] == "1":
  count += 1
if a[1] == "1":
  count += 1
if a[2] == "1":
  count += 1
print(count)
from sys import stdin

n = int(input())
r = int(input())

if n < 10:
    print(r + 100 * (10-n))
else:
    print(r)


### FIXED CODE ###

from sys import stdin

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

if n < 10:
    print(r + 100 * (10-n))
else:
    print(r)
n = int(input())
*li,=map(int, input().split())
from collections import Counter
c = Counter()
for i in li:
    c[i] += 1
ans=0
from math import comb
for i in c.values():
    ans += comb(i, 2)
for i in li:
    print(ans - comb(c[i], 2) + comb(c[i-1], 2))
  

### FIXED CODE ###

n = int(input())
*li,=map(int, input().split())
from collections import Counter
c = Counter()
for i in li:
    c[i] += 1
ans=0
from math import comb
for i in c.values():
    ans += comb(i, 2)
for i in li:
    print(ans - comb(c[i], 2) + comb(c[i]-1, 2))
n=int(input())
s=input()
k=int(input)
for i in range(n):
  if s[i]!=s[k-1]:
    s[i]="*"
print(s)

### FIXED CODE ###

n=int(input())
s=input()
k=int(input())
a=[]
for i in range(n):
  if s[i]!=s[k-1]:
    print("*",end="")
  else: print(s[i],end="")
n = int(input())
for i in range(1,n+1):
  if i%3==0 or i%10==3:
    print(" ",i,sep='',end="")
print()


### FIXED CODE ###

r,c=map(int, input().split())
S=[]
for num in range(r):
  A=list(map(int, input().split()))
  S.append(A)
  A.append(sum(A))

#print(list(zip(*S)))
C=[]
for t in (zip(*S)):
  C.append(sum(t))
S.append(C)
for i in S:
  print(*i)
def solve(pick, idx):

    if pick == 0: return 0
    if idx >= n: return -float('inf')
    if (pick, idx) in dp: return dp[pick, idx]
    # if n-idx+2 < pick*2: return -float('inf')
    total = max(A[idx] + solve(pick-1, idx+2), solve(pick, idx+1))

    dp[(pick, idx)] = total
    return total

n = int(input())
A = list(map(int, input().split()))
dp = {}
pick = n//2

print(solve(pick, 0))


### FIXED CODE ###

import sys

sys.setrecursionlimit(10 ** 9)
def solve(pick, idx):

    if pick == 0: return 0
    if idx >= n: return -float('inf')
    if (pick, idx) in dp: return dp[pick, idx]
    if n-idx+2 < pick*2: return -float('inf')
    total = max(A[idx] + solve(pick-1, idx+2), solve(pick, idx+1))

    dp[(pick, idx)] = total
    return total

n = int(input())
A = list(map(int, input().split()))
dp = {}
pick = n//2

print(solve(pick, 0))
# coding: utf-8
# Your code here!
import math
A,V = int(input().split())
B,W = int(input().split())
T = int(input())

dis=abs(A-B)
dis1=(V-W)*T
if dis<=dis1:
    print("YES")
else:
    print("NO")


### FIXED CODE ###

# coding: utf-8
# Your code here!
A,V = map(int,input().split())
B,W = map(int,input().split())
T = int(input())

dis=abs(A-B)
dis1=(V-W)*T

if dis<=dis1:
    print("YES")
else:
    print("NO")
import sys
input= sys.stdin.readline

N,M = map(int,input().split())
g=max(M//N,M**0.5)#最大公約数になる可能性のある最大値
for i in range(g):
  if M%(g-i)==0:
    print(g-i)
    exit()


### FIXED CODE ###

import sys
input= sys.stdin.readline

N,M = map(int,input().split())
g=M//N#最大公約数になる可能性のある最大値
for i in range(g):
  if M%(g-i)==0:
    print(g-i)
    exit()
  if M%(N+i)==0:
    print(M//(N+i))
    exit()
forcast = input().split()
actual = input().split()
match = 0
for i in range(

### FIXED CODE ###

p = list(input())
a = list(input())
o = [a[i] for i in range(len(p)) if p[i] == a[i]]
print(len(o))
cards = int(input())
i = 0
cardlist = []
while(i < cards):
    cardlist.append(list(map(str,input().split())))
    i += 1
SP = [0] * 13
HR = [0] * 13
CL = [0] * 13
DY = [0] * 13
    
for i in cardlist:
    num = int(i[1])
    if  (i[0] == S):
        SP[num] = 1
    elif(i[0] == H):
        HR[num] = 1
    elif(i[0] == C):
        CL[num] = 1
    elif(i[0] == D):
        DY[num] = 1

c = 0
for i in SP:
    c += 1
    if i == 1:
        print("S %d" %c)
c = 0
for i in HR:
    c += 1
    if i == 1:
        print("H %d" %c)
c = 0
for i in CL:
    if i == 1:
        print("C %d" %c)
c = 0
for i in DY:
    if i == 1:
        print("D %d" %c)
print()


### FIXED CODE ###

cards = int(input())
i = 0
cardlist = []
while(i < cards):
    cardlist.append(list(map(str,input().split())))
    i += 1
SP = [False] * 13
HR = [False] * 13
CL = [False] * 13
DY = [False] * 13

for i in cardlist:
    num = int(i[1])-1
    if  (i[0] == "S"):
        SP[num] = True
    elif(i[0] == "H"):
        HR[num] = True
    elif(i[0] == "C"):
        CL[num] = True
    elif(i[0] == "D"):
        DY[num] = True

c = 0
for i in SP:
    c += 1
    if i == False:
        print("S %d" %c)
c = 0
for i in HR:
    c += 1
    if i == False:
        print("H %d" %c)
c = 0
for i in CL:
    c += 1
    if i == False:
        print("C %d" %c)
c = 0
for i in DY:
    c += 1
    if i == False:
        print("D %d" %c)
def dfs(cost, N):
    if N<6 :
        return cost+N
    else:
        ret0 = 6 ** math.floor(math.log(N, 6))
        ret1 = 9 ** math.floor(math.log(N, 9))
        if (ret0>1) and (ret1>1):
            return min(dfs(cost+1, N-ret0), dfs(cost+1, N-ret1))
        else:
            ret = max(ret0, ret1)
            return dfs(cost+1, N-ret)

N = int(input())
print(dfs(0, N))

### FIXED CODE ###

N = int(input())
if N<=999:
    print('ABC')
else:
    print('ABD')
from math import gcd

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

if N==1 or K==1:
    print(0)
else:
    print(gcd(N, K))


### FIXED CODE ###

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

ans = N

tmp = N%K

if tmp > abs(tmp-K):
    print(abs(tmp-K))
else:
    print(tmp)
i = map(int, input().split())

if i[0] == i[1]:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

i,j = map(int, input().split())

if i == j:
  print("Yes")
else:
  print("No")
from sys import stdin


def calc_area_size(a):
    return int(3 * (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)))
n=input()
p=list(map(int,input().split(" ")))
result=sum(p)
for i in range(n-1):
    s1 = sum(p[:i+1])
    s2 = sum(p[i+1:])
    result = min(result,abs(s1-s2))
print(result)

### FIXED CODE ###

n=int(input())
p = list(map(int,input().split()))
result=sum(p)
for i in range(n-1):
    s1 = sum(p[:i+1])
    s2 = sum(p[i+1:])
    result = min(result,abs(s1-s2))
print(result)
# -*- utf-8 -*-

while True:
    inp = raw_input()
    if inp == "":
        break
    i = map(int, inp.split())
    a = i[0]
    b = i[1]
    
    s = a + b
    
    ans = 0
    
    while s >= 1:
        s /= 10
        ans += 1
    
    print ans

### FIXED CODE ###

# -*- utf-8 -*-

while True:
    try:
        inp = raw_input()
        i = map(int, inp.split())
        a = i[0]
        b = i[1]
    
        s = a + b
    except:
        break
    
    ans = 0
    
    while s >= 1:
        s /= 10
        ans += 1
    
    print ans
ans = 1001
N,T = map(int,input().split())
for i in range(N):
  c,t = map(int,input().split())
  if t <= T and c <= T
    ans = c
  if ans = 1001:
    print("TLE")
  else:
    print(ans)

### FIXED CODE ###

n,o = map(int, input().split())
ans = 1001
for i in range(n):
  c,t = map(int, input().split())
  if t <= o and c <= ans:
    ans =  c
if ans == 1001 : print("TLE")
else : print(ans)
n = int(input())
a = list(map(int,input().split()))
mi = 0
for i in a:
	mi = min(m,i)
	ma = max(m,i)
print(ma-mi)

### FIXED CODE ###

n = int(input())
a = list(map(int,input().split()))
mi,ma = 100000,0
for i in a:
	mi = min(mi,i)
	ma = max(ma,i)
print(ma-mi)
import math
while t == 0:	
	x,y=[int(i) for i in input().split()]
	a = int (math.log10(x + y) + 1)
	print(a)

### FIXED CODE ###

import math
t = 0
while t == 0:	
	try:
		x,y=[int(i) for i in input().split()]
	except:
		break
	else:
		a = int (math.log10(x + y) + 1)
		print(a)
import math
denom = int(1e9+7)

def power_func(a,b,p):
  if b==0: return 1
  if b%2==0:
    d=power_func(a,b//2,p)
    return d*d %p
  if b%2==1:
    return (a*power_func(a,b-1,p ))%p


def combi2(n,k,p,f,pow_fun):
  if n<0 or k<0 or n<k: return 0
  if n==0 or k==0: return 1
  a=fact_mod[n]
  b=fact_mod[k]
  c=fact_mod[n-k]
  return (a*pow_fun[b]*pow_fun[c])%p


N, K = map(int, input().split())
A = [int(i) for i in input().split()]
A.sort(reverse = True)

fact_mod = [1]
current = 1
for i in range(1,N+1):
    current = (current * i) % denom
    fact_mod.append(current)

pow_fun = []
for i in range(N+1):
    pow_fun.append(power_func(i,denom-2,denom))

max_tot = 0
min_tot = 0
for i in range(N-K+1):
    max_tot += (A[i] * combi2(N-i-1, K-1, denom, fact_mod,pow_fun)) % denom
    min_tot += (A[N-i-1] * combi2(N-i-1, K-1, denom, fact_mod,pow_fun)) % denom
    
print((max_tot - min_tot)%denom)

### FIXED CODE ###

import math
denom = int(1e9+7)

def power_func(a,b,p):
  if b==0: return 1
  if b%2==0:
    d=power_func(a,b//2,p)
    return d*d %p
  if b%2==1:
    return (a*power_func(a,b-1,p ))%p


def combi2(n,k,p,f,pow_fun):
  if n<0 or k<0 or n<k: return 0
  if n==0 or k==0: return 1
  a=fact_mod[n]
  b=fact_mod[k]
  c=fact_mod[n-k]
  return (a*pow_fun[b]*pow_fun[c])%p


N, K = map(int, input().split())
A = [int(i) for i in input().split()]
A.sort(reverse = True)

fact_mod = [1]
current = 1
for i in range(1,N+1):
    current = (current * i) % denom
    fact_mod.append(current)

pow_fun = {}
for i in fact_mod:
    pow_fun[i]=power_func(i,denom-2,denom)

max_tot = 0
min_tot = 0
for i in range(N-K+1):
    max_tot += (A[i] * combi2(N-i-1, K-1, denom, fact_mod,pow_fun)) % denom
    min_tot += (A[N-i-1] * combi2(N-i-1, K-1, denom, fact_mod,pow_fun)) % denom
    
print((max_tot - min_tot)%denom)
N = int(input())
S,T = map(input().split())
A = ""
for i in S:
  A+=i
  for j in T:
    A+=j
print(A)


### FIXED CODE ###

N = int(input())
S,T = map(str,input().split())
A = ""
for (i,j) in zip(S,T):
  A+=i
  A+=j
print(A)
import sys
from collections import deque
import copy

def get_read_func(fileobject):
    if fileobject == None :
        return raw_input
    else:
        return fileobject.readline


def main():
    if len(sys.argv) > 1:
        f = open(sys.argv[1])
    else:
        f = None
    read_func = get_read_func(f);
    input_raw = read_func().strip().split()
    [N] = [int(input_raw[0])]
    input_raw = read_func().strip().split()
    A_i = []
    for i in range(N):
        A_i.append(long(input_raw[i]) - i)


    ave_A = (sum(A_i)/N)
    A_i.sort()
    
    b1 = (ave_A)
    b2 = ave_A + 1
    b3 = A_i[N/2]
    b4 = A_i[N/2 + 1]
    b5 = -b1
    b6 = -b2
    score1 = 0L
    score2 = 0L
    score3 = 0L
    score4 = 0L
    score5 = 0L
    score6 = 0L
    for i in range(N):
        score1 += abs(b1 - A_i[i])
        score2 += abs(b2 - A_i[i])
        score3 += abs(b3 - A_i[i])
        score4 += abs(b4 - A_i[i])
        score5 += abs(b5 - A_i[i])
        score6 += abs(b6 - A_i[i])

    print min(score1, score2, score3, score4,score5,score6)




if __name__ == '__main__':
    main()


### FIXED CODE ###

import sys
from collections import deque
import copy

def get_read_func(fileobject):
    if fileobject == None :
        return raw_input
    else:
        return fileobject.readline


def main():
    if len(sys.argv) > 1:
        f = open(sys.argv[1])
    else:
        f = None
    read_func = get_read_func(f);
    input_raw = read_func().strip().split()
    [N] = [int(input_raw[0])]
    input_raw = read_func().strip().split()
    A_i = []
    for i in range(N):
        A_i.append(long(input_raw[i]) - i)


    ave_A = (sum(A_i)/N)
    A_i.sort()
    
    b1 = (ave_A)
    b2 = ave_A + 1
    b3 = A_i[N/2]
    b4 = b3
    b5 = -b1
    b6 = -b2
    score1 = 0L
    score2 = 0L
    score3 = 0L
    score4 = 0L
    score5 = 0L
    score6 = 0L
    for i in range(N):
        score1 += abs(b1 - A_i[i])
        score2 += abs(b2 - A_i[i])
        score3 += abs(b3 - A_i[i])
        score4 += abs(b4 - A_i[i])
        score5 += abs(b5 - A_i[i])
        score6 += abs(b6 - A_i[i])

    print min(score1, score2, score3, score4,score5,score6)




if __name__ == '__main__':
    main()
for i,j in [1:100,1:100]:
  print i*j

### FIXED CODE ###

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