Harryxun/stf_run huggingface dataset:
N,K=map(int,input().split())
A=list(map(int,input().split()))
F=list(map(int,input().split()))
B=sorted(A)
G=sorted(F)[::-1]
C=[]
for i in range(N):
  C.append(B[i]*G[i])

def dfs(t):
  if t==K:
    print(max(C))
  else:
    n=C.index(max(C))
    C[n]-=G[n]
    dfs(t+1)

if sum(A) <= K:
  print(0)
else:
  dfs(0)

### FIXED CODE ###

N,K=map(int, input().split())
A=list(map(int, input().split()))
F=list(map(int, input().split()))
A=sorted(A)
F=sorted(F)[::-1]
import numpy as np
a=np.array(A)
f=np.array(F)

low=-1
high=10**18

while high-low>1:
  d=(high+low)//2
  #0かa-d//fの大きい値を採用するnp.maximum　
  if np.maximum(0,a-d//f).sum()<=K:
    high=d
  else:
    low=d
print(high)
# coding: utf-8
import numpy as np
n = int(input())
a = np.array(list(map(int, input().split())))
a = a*2
#a = a.reshape((a.shape[0],1))
#print(n,a)

N = np.zeros((n,n), dtype=int)
for i in range(n):
    N[i,i] = 1
    if i+1 == n:
        N[i,0] = 1
    else:
        N[i,i+1] = 1
#print(N)

ans = np.linalg.solve(N,a)
#ans = ans.reshape((ans.shape[0],))
ans = ans.astype(np.int)
print(*ans)



### FIXED CODE ###

# coding: utf-8
n,a,b = map(int, input().split())
if n*a < b:
    print(n*a)
else:
    print(b)
n,k=map(int,input().split())
a=list(map(int,input().split()))
s=[]
if n==1:
    print(a[0])
else:
    for i in range(n-k+1):
        if a[i]<=0 and 0<=a[i+k-1]:
            s.append(min(2*a[i+k-1]-a[i],a[i+k-1]-2*a[i]))
        elif a[i+k]<=2:
            s.append(-a[i])
        else:
            s.append(a[i+k-1])
    print(min(s))

### FIXED CODE ###

n,k=map(int,input().split())
a=list(map(int,input().split()))
s=[]
if n==1:
    print(a[0])
else:
    for i in range(n-k+1):
        if a[i]<=0 and 0<=a[i+k-1]:
            s.append(min(2*a[i+k-1]-a[i],a[i+k-1]-2*a[i]))
        elif a[i+k-1]<=0:
            s.append(-a[i])
        else:
            s.append(a[i+k-1])
    print(min(s))
#include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
typedef long long ll;
typedef pair<int, int> P;
const int INF = 100100100;
const int MOD = (int)1e9 + 7;
const double EPS = 1e-9;
struct Edge {
  ll to;
  ll cost;
};
int main() {
  string sa, sb, sc;
  cin >> sa >> sb >> sc;
  char now = 'a';
  while (true) {
    if (now == 'a') {
      if (sa.size() == 0) {
        cout << 'A' << endl;
        return 0;
      }
      now = sa[0];
      sa.erase(sa.begin());
    } else if (now == 'b') {
      if (sb.size() == 0) {
        cout << 'B' << endl;
        return 0;
      }
      now = sb[0];
      sb.erase(sb.begin());
    } else {
      if (sc.size() == 0) {
        cout << 'C' << endl;
        return 0;
      }
      now = sc[0];
      sc.erase(sc.begin());
    }
  }
}


### FIXED CODE ###

A =list(str(input()))
B =list(str(input()))
C =list(str(input()))
P=A
for i in range(len(A)+len(B)+len(C)+3):
    if P[0] == 'a':
        P.pop(0)
        P=A
        if len(A) ==0:
            print('A')
            break
    elif P[0] =='b':
        P.pop(0)
        P=B
        if len(B) ==0:
            print('B')
            break
    elif P[0] =='c':
        P.pop(0)
        P=C
        if len(C) ==0:
            print('C')
            break
n = int(input())
list_a = list(map(int, input().split(" ")))

min_diff = 10**9
for i in range(len(list_a)-1):
    sunuke = sum(list_a[:i+1])
    arai = sum(list_a[i+1:])
    diff = abs(sunuke - arai)
    if min_diff > diff:
        min_diff = diff

print(min_diff)


### FIXED CODE ###

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

if (a + b) % 3 == 0 or a % 3 == 0 or b % 3 == 0:
  print("Possible")
else:
  print("Impossible")
N,K,L = map(int, input().split())


class UFT:
    def __init__(self, N):
        self.UFdata = [-1] * (N+1)
        self.rank   = [0]  * (N+1)

    def find(self,x):
        UFdata = self.UFdata
        while UFdata[x] != -1:
            x = UFdata[x]
        return x

    def unite(self,x,y):
        UFdata = self.UFdata
        rank = self.rank 
        find = self.find

        x = find(x)
        y = find(y)
        if x != y:
            if rank[x] < rank[y]:
                x,y = y,x
            if rank[x] == rank[y]:
                rank[x] += 1
            UFdata[y] = x       
            

UF1 = UFT(N)
UF2 = UFT(N)
ans = [1] * (N+1)
MAP= [ [0] * (N+1) for _ in range(N+1)]
import sys
input = sys.stdin.readline
PQ = [ [int(j) for j in input().split()] for _ in range(K)]
RS = [ [int(j) for j in input().split()] for _ in range(L)]

for i in range(K):
    p,q = PQ[i]
    UF1.unite(p,q)
for i in range(L):
    p,q = RS[i]
    UF2.unite(p, q)
counter=[]
from collections import defaultdict
cntdic =defaultdict(int)
for i in range(1,N+1):
  counter.append(UF1.find(i)+UF2.find(i)*10**6)
  cntdic[counter[-1]]+=1 

ans = [0]*(N+1)
for i in range(1,N+1):
    ans[i] = cntdic[counter[i-1]]

del ans[0]
# print(" ".join( map(lambda x: str(x), connected_num[1:])))
print(" ".join( map(lambda x: str(x), ans)))


### FIXED CODE ###

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


class UFT:
    def __init__(self, N):
        self.UFdata = [-1] * (N+1)
        self.rank   = [0]  * (N+1)

    def find(self,x):
        UFdata = self.UFdata
        while UFdata[x] != -1:
            x = UFdata[x]
        return x

    def unite(self,x,y):
        UFdata = self.UFdata
        rank = self.rank 
        find = self.find

        x = find(x)
        y = find(y)
        if x != y:
            if rank[x] < rank[y]:
                x,y = y,x
            if rank[x] == rank[y]:
                rank[x] += 1
            UFdata[y] = x       
            

UF1 = UFT(N)
UF2 = UFT(N)
ans = [1] * (N+1)
# MAP= [ [0] * (N+1) for _ in range(N+1)]
import sys
input = sys.stdin.readline
#PQ = [ [int(j) for j in input().split()] for _ in range(K)]
#RS = [ [int(j) for j in input().split()] for _ in range(L)]

for i in range(K):
    p,q = map(int,input().split())
    UF1.unite(p,q)
for i in range(L):
    p,q = map(int,input().split())#RS[i]
    UF2.unite(p, q)
counter=[]
from collections import defaultdict
cntdic =defaultdict(int)
for i in range(1,N+1):
  counter.append(UF1.find(i)+UF2.find(i)*10**6)
  cntdic[counter[-1]]+=1 

ans = [0]*(N+1)
for i in range(1,N+1):
    ans[i] = cntdic[counter[i-1]]

del ans[0]
# print(" ".join( map(lambda x: str(x), connected_num[1:])))
print(" ".join( map(lambda x: str(x), ans)))
l=list(map(int,input().split()))
d=list(map(int,input().split()))
d_bar=[]
for m in range(10):
    if m not in d:
        d_bar.append(m) 
d_bar.sort()
a=[]
n_str=str(l[0])
n_int=[int(k) for k in n_str]
for i in n_int:
    a.append('na')
    for j in d_bar:
        if i<=j:
            a[i-1]=j
            break
        else:
            pass
    if a[i-1]='na':
        a[i-1]=d_bar[0]
if a[0]=0:
    a.insert(0,d_bar[0])

print(int(a))

### FIXED CODE ###

l=list(map(int,input().split()))
d=list(map(int,input().split()))
u={i for i in range(10)}
d_bar=u-set(d)
d_bar={str(i) for i in d_bar}
n=l[0]
n_set=set(str(n))
while True:
    if n_set<=d_bar:
        print(n)
        break
    n=n+1
    n_set=set(str(n))
w, h, x, y= map(int,input().split())

f = 0
if x <= w/2 and y <= h/2:
    if y/x == h/w and x == w/2 and y == h/2:
        s = h*w/2
        f = 1
    elif y/x == h/w:
        s = h*w/2
    else:
        s1 = x*h
        s2 = w*y
        s = max(s1,s2)
        if s1 == s2:
            f=1
    print(s,f)
elif x > w/2 and y <= h/2:
    if (h-y)/x == h/w:
        s = h*w/2
    else:
        s1 = (w-x)*h
        s2 = w*y
        s = max(s1,s2)
        if s1 == s2:
            f=1
    print(s,f)
elif x > w/2 and y > h/2:
    if y/x == h/w:
        s = h*w/2
    else:
        s1 = (w-x)*h
        s2 = w*(h-y)
        s = max(s1,s2)
        if s1 == s2:
            f=1
    print(s,f)
elif x <= w/2 and y > h/2:
    if (h-y)/x == h/w:
        s = h*w/2
    else:
        s1 = x*h
        s2 = w*(h-y)
        s = max(s1,s2)
        if s1 == s2:
            f=1
    print(s,f)

### FIXED CODE ###

w, h, x, y= map(int,input().split())

f = 0
s = h*w/2
if x == w/2 and y == h/2:
    f = 1

print(s,f)
from heapq import *
import sys
from collections import *
from itertools import *
from decimal import *
import copy
from bisect import *
import math
sys.setrecursionlimit(4100000)
def gcd(a,b):
    if(a%b==0):return(b)
    return (gcd(b,a%b))
input=lambda :sys.stdin.readline().rstrip()


N=int(input())
X=input()
C=X.count("1")

lst=[]
lstcount=[]
for x in [C-1,C+1]:
    flg=0
    if C<=0:
        lst.append(0)
        lstcount.append(0)
    else:
        Z=0
        p=1
        for i in range(N):
            if X[-i-1]=="1":
                Z+=p
            p*=2
            if Z>=x:
                Z%=x
                flg=1
            if flg:
                p%=x
        lst.append(Z)
        lstcount.append(flg)

#print(lst)
fac1=[1]
fac2=[1]
C1=C-1
C2=C+1
for i in range(N):
    fac1.append(fac1[-1]*2%C1)
    fac2.append(fac2[-1]*2%C2)

for i in range(N):

    _C=C+(1 if X[i]=="0"  else -1 )
    if _C==0:
        print(0)
        continue
    if  X[i]=="0":
        lstidx=1
    else:
        lstidx=0

    idx=(N-1-i)

    value=lst[lstidx]+(fac2[idx] if  X[i]=="0" else fac1[idx])
    #print(lst[lstidx],value,_C)
    count=lstcount[lstidx]-1
    while value:
        count+=1
        value%=_C
        _C=0
        bit=value
        while bit:
            _C+=bit&1
            bit>>=1
    print(max(count,1))


### FIXED CODE ###

from heapq import *
import sys
from collections import *
from itertools import *
from decimal import *
import copy
from bisect import *
import math
sys.setrecursionlimit(4100000)
def gcd(a,b):
    if(a%b==0):return(b)
    return (gcd(b,a%b))
input=lambda :sys.stdin.readline().rstrip()


N=int(input())
X=input()
C=X.count("1")

lst=[]
lstcount=[]
for x in [C-1,C+1]:
    flg=0
    if x<=0:
        lst.append(0)
        lstcount.append(0)
    else:
        Z=0
        p=1
        for i in range(N):
            if X[-i-1]=="1":
                Z+=p
            p*=2
            if Z>=x:
                Z%=x
                flg=1
            if flg:
                p%=x
        lst.append(Z)
        lstcount.append(flg)
#print(lst)
fac1=[1]
fac2=[1]
C1=max(C-1,1)
C2=max(C+1,1)
for i in range(N):
    fac1.append(fac1[-1]*2%C1)
    fac2.append(fac2[-1]*2%C2)

for i in range(N):

    _C=C+(1 if X[i]=="0"  else -1 )
    if _C==0:
        print(0)
        continue
    if  X[i]=="0":
        lstidx=1
    else:
        lstidx=0

    idx=(N-1-i)

    value=lst[lstidx]+(fac2[idx] if  X[i]=="0" else -fac1[idx])
    #print(value,X[i]=="0",lst,C-1,C+1)
    bit=value
    count=0
    while value and _C:
        count+=1
        value%=_C
        _C=0
        bit=value
        while bit:
            _C+=bit&1
            bit>>=1
    print(max(count,1))
s = input()
for i, j in enumerate(y):
    if s == j:
        print(7-i)

### FIXED CODE ###

y = ['SUN','MON','TUE','WED','THU','FRI','SAT']
s = input()
for i, j in enumerate(y):
    if s == j:
        print(7-i)
        exit()
a,b = int(input().split())

sum = a+b
if(sum>=10):
  print("error")
 else:
  print(sum)


### FIXED CODE ###

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

sum = a + b
if sum >= 10:
    print("error")
else:
    print(sum)
N,M = map(int,input().split())
A = list(map(int,input().split()))
ans1 = 0
ans2 = 0
for a in A:
    if M > a:
        ans1 +=1
    else:
        ans2 +=1 
paint(min(ans1,ans2))

### FIXED CODE ###

N,M,X = map(int,input().split())
A = list(map(int,input().split()))
ans1 = 0
ans2 = 0
for a in A:
    if X > a:
        ans1 +=1
    else:
        ans2 +=1 
print(min(ans1,ans2))
n,m=map(int,input().split())
a=['.']
a*=n
ans=0
for i in range(m):
    si,ci=input().split()
    si=int(si)
    ci=str(ci)
    if a[si-1]=='.':
        a[si-1]=ci
    else:
        if a[si-1]==ci:
            continue
        else:
            ans=-1
            break

if ans==-1 or (n>=2 and a[0]=='0'):
    print(-1)
else:
    if n==1 and a[0]=='.':
        a[0]=0
    elif a[0]=='.':
        a[0]='1'
    for i in range(1,n):
        if a[i]=='.':
            a[i]='0'
    a=''.join(a)
    print(a)

### FIXED CODE ###

n,m=map(int,input().split())
a=['.']
a*=n
ans=0
for i in range(m):
    si,ci=input().split()
    si=int(si)
    ci=str(ci)
    if a[si-1]=='.':
        a[si-1]=ci
    else:
        if a[si-1]==ci:
            continue
        else:
            ans=-1
            break

if ans==-1 or (n>=2 and a[0]=='0'):
    print(-1)
else:
    if n==1 and a[0]=='.':
        a[0]='0'
    elif a[0]=='.':
        a[0]='1'
    for i in range(1,n):
        if a[i]=='.':
            a[i]='0'
    a=''.join(a)
    print(a)
N,M=map(int,input().split())
l=[list(map(int,input().split())) for i in range(N)]
l_1=sorted(l,key=lambda l:l[1],reverse=True)
l_2=[0]*(M+N)
d=0
for i in range(N):
    if d+l_1[i][0]<=M:
        l_2[d+l_1[i][0]]+=l_1[i][1]
        del l_1[i]
        d+=1
    else:
        break
l_3=sorted(l_1, key=lambda l_1:(l_1[0],-l_1[1]))
for i in range(N):
    if d+l_3[i][0]<=M:
        l_2[d+l_1[i][0]]+=l_3[i][1]
        d+=1
    else:
        break 
print(sum(l_2))


### FIXED CODE ###

import heapq
N,M=map(int,input().split())
l=[tuple(map(int,input().split())) for i in range(N)]
l.sort(reverse=True)

h=[]
ans=0
for i in range(1,M+1):
    while l and l[-1][0]==i:
        heapq.heappush(h,l.pop()[1]*(-1))
    if h:
        ans-=heapq.heappop(h)
print(ans)
H,W,A,B = map(int,input().split())
import numpy as np
ans = np.array([[0] * W] * H)
for h in range(H):
    for w in range(W):
        if w >= A and h >= B:
            pass
        elif w >= A:
            ans[h,w] = 1
        elif h >= B:
            ans[h,w] = 1
        else:
            pass
for h in range(H):
    a = ans[h].tolist()
    print(*a,sep="")

### FIXED CODE ###

H,W,A,B = map(int,input().split())
import numpy as np
ans = np.array([[0] * W] * H)
for h in range(H):
    for w in range(W):
        if w >= A and h >= B:
            pass
        elif w >= A:
            ans[h,w] = 1
        elif h >= B:
            ans[h,w] = 1
        else:
            pass
for h in range(H):
    a = ans[h].tolist()
    print(*a,sep="")
n,m=[int(i) for i in input().split()]
ab=[]
cd=[]
for i in range(n):
    a,b=[int(j) for j in input().split()]
    ab.append((a,b))

for i in range(m):
    c,d=[int(j) for j in input().split()]
    cd.append((c,d))

for i in range(n):
    mini=10000000
    for j in range(m):
        dis=abs(ab[i][0]-cd[j][0])+abs(ab[i][1]-cd[j][1])
        if mini>dis:
            mini=dis
            point=j+1
    print(point)

### FIXED CODE ###

n,m=[int(i) for i in input().split()]
ab=[]
cd=[]
for i in range(n):
    a,b=[int(j) for j in input().split()]
    ab.append((a,b))

for i in range(m):
    c,d=[int(j) for j in input().split()]
    cd.append((c,d))

for i in range(n):
    mini=10000000000000000
    for j in range(m):
        dis=abs(ab[i][0]-cd[j][0])+abs(ab[i][1]-cd[j][1])
        if mini>dis:
            mini=dis
            point=j+1
    print(point)
X=int(input(),16)
Y=int(input(),16)
if X>Y:
    print('>')
elif X<Y:
    print('<')
else:
    print('=')

### FIXED CODE ###

X,Y=input().split()
if X>Y:
    print(">")
elif X<Y:
    print("<")
else:
    print("=")
import sys
import math
import heapq
sys.setrecursionlimit(10**7)
INTMAX = 9223372036854775807
INTMIN = -9223372036854775808
DVSR = 1000000007
def POW(x, y): return pow(x, y, DVSR)
def INV(x, m=DVSR): return pow(x, m - 2, m)
def DIV(x, y, m=DVSR): return (x * INV(y, m)) % m
def LI(): return map(int, sys.stdin.readline().split())
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def II(): return int(sys.stdin.readline())


def FLIST(n):
    res = [1]
    for i in range(1, n+1):
        res.append(res[i-1]*i % DVSR)
    return res


class ModInt:
    def __init__(self, a, dvsr=DVSR):
        self.dvsr = dvsr
        self.value = a % dvsr

    def __iadd__(self, b):
        self.value += b
        self.value %= self.dvsr

    def __isub__(self, b):
        self.value -= b
        self.value %= self.dvsr

    def __imul__(self, b):
        self.value *= b
        self.value %= self.dvsr

    def __ifloordiv__(self, b):
        self.value *= pow(b, self.dvsr - 2, self.dvsr)
        self.value %= self.dvsr

    def __str__(self):
        return str(self.value)


N, M = LI()
FACT = FLIST(M)


def NCR(n, r):
    res = FACT[n-r]
    res *= FACT[r]
    res %= DVSR
    res = INV(res)
    res *= FACT[n]
    res %= DVSR
    return res


def NPR(n, r):
    res = FACT[n]*INV(FACT[n-r])
    res %= DVSR
    return res


ALL = ModInt(NPR(M, N))
ALL *= ALL.value

PAT = ModInt(0)
for i in reversed(range(1, N+1)):
    v = ModInt(NCR(N, i))
    v *= NPR(M, i)
    v *= NPR(M-i, N-i)
    v *= NPR(M-i, N-i)
    PAT = ModInt(v.value - PAT.value)

### FIXED CODE ###

import sys
import math
import heapq
sys.setrecursionlimit(10**7)
INTMAX = 9223372036854775807
INTMIN = -9223372036854775808
DVSR = 1000000007
def POW(x, y): return pow(x, y, DVSR)
def INV(x, m=DVSR): return pow(x, m - 2, m)
def DIV(x, y, m=DVSR): return (x * INV(y, m)) % m
def LI(): return map(int, sys.stdin.readline().split())
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def II(): return int(sys.stdin.readline())


def FLIST(n):
    res = [1]
    for i in range(1, n+1):
        res.append(res[i-1]*i % DVSR)
    return res


N, M = LI()
FACT = FLIST(M)


def NCR(n, r):
    res = 1
    res *= FACT[n-r]
    res *= FACT[r]
    res %= DVSR
    res = INV(res)
    res *= FACT[n]
    res %= DVSR
    return res


def NPR(n, r):
    res = 1
    res *= FACT[n]
    res *= INV(FACT[n-r])
    res %= DVSR
    return res


ALL = NPR(M, N)
ALL %= DVSR
ALL *= ALL
ALL %= DVSR


PAT = 0
for i in reversed(range(1, N+1)):
    v = NCR(N, i)
    v *= NPR(M, i)
    v %= DVSR
    v *= NPR(M-i, N-i)
    v %= DVSR
    v *= NPR(M-i, N-i)
    v %= DVSR
    PAT = v - PAT
    PAT %= DVSR

print((ALL - PAT) % DVSR)
K=input()
S=input()

len_S=len(S)

if K<=len_S:
  print(S)
  
else:
  print(S[K:], "...")

### FIXED CODE ###

K=int(input())
S=str(input())


if K>=len(S):
  print(S)
  
else:
  print(S[:K]+ "...")
n,m=map(int,input().split())

a_lis=[list(map(int,input())) for i in range(n)]
c_lis=[list(map(int,input())) for i in range(m)]

for i in range(n):
  num=0
  ans=10**8
  for j in reversed(range(m)):
    a=a_lis[i]
    c=c_lis[j]
    num=abs(a[0]-c[0])+abs(a[1]-c[1])
    ans=min(ans,num)
    if num==ans:
      cnt=j+1
  print(cnt)
    

### FIXED CODE ###

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

a_lis=[list(map(int,input().split())) for i in range(n)]
c_lis=[list(map(int,input().split())) for i in range(m)]

for i in range(n):
  num=0
  ans=10**10
  for j in reversed(range(m)):
    a=a_lis[i]
    c=c_lis[j]
    num=abs(a[0]-c[0])+abs(a[1]-c[1])
    ans=min(ans,num)
    if num==ans:
      cnt=j+1
  print(cnt)
l=[]
m=[]
n=[]
for i in range(5):
  s=int(input())  
  m.append(round(int(s+5),-1))
  if s%10 != 0:
    l.append(s%10)
print(sum(m)+min(l)-10)

### FIXED CODE ###

l=[]
m=[]
n=[]
a=0
for i in range(5):
  s=int(input())
  n.append(s)
  m.append(round(int(s+5),-1))
  if s%10 != 0:
    l.append(s%10)
    a+=1
if a ==0:
  print(sum(n))
else:
  print(sum(m)+min(l)-10)
a,b,c,d = map(int,input().split())
print(min(a,b)+min(c,d))

### FIXED CODE ###

a,b,c,d=[int(input()) for i in range(4)]
print(min(a,b)+min(c,d))
n,q=list(map(int,input().split()))
s=input()
li=[0]
c=0
for i in range(1,n-1):
  if s[i-1]=="A" and s[i]=="C":
    c+=1
  li.append(c)

for i in range(q):
  l,r=list(map(int,input().split()))
  l-=1
  r-=1
  print(li[r]-li[l])

### FIXED CODE ###

n,q=list(map(int,input().split()))
s=input()
li=[0]
c=0
for i in range(1,n):
  if s[i-1]=="A" and s[i]=="C":
    c+=1
  li.append(c)

for i in range(q):
  l,r=list(map(int,input().split()))
  l-=1
  r-=1
  print(li[r]-li[l])
def main():
  n, k = map(int, input().split())

  plus = []
  minus = []

  for n in input().split():
    n = int(n)
    if n >= 0:
      plus.append(n)
    else:
      minus.append(n)

  plus.sort(reverse = True)
  minus.sort()

  pn = min(len(plus), k)
  mn = k - pn

  if len(plus) >= 2 and len(minus) >= 2:
    while pn >= 2:
      if plus[pn - 2] * plus[pn - 1] > minus[mn] * minus[mn + 1]:
        break

      pn -= 2
      mn += 2

  mod = 10 ** 9 + 7
  ans = 1
  for i in range(pn):
    ans = (ans * plus[i]) % mod

  for i in range(mn):
    ans = ans * minus[i]

  if ans < 0:
    ans = 1
    for i in range(pn):
      ans = (ans * plus[-i - 1]) % mod

    for i in range(mn):
      ans = ans * minus[-i - 1]


  print(ans % mod)


main()


### FIXED CODE ###


def main():
  n, k = map(int, input().split())

  mod = 10 ** 9 + 7

  if n == k:
    ans = 1
    for num in input().split():
      ans = (ans * int(num)) % mod

    print(ans % mod)
    return

  plus = []
  minus = []
  for num in input().split():
    num = int(num)
    if num >= 0:
      plus.append(num)
    else:
      minus.append(num)

  pn = len(plus)
  mn = len(minus)

  if pn == 0 and k % 2 == 1:
    minus.sort(reverse = True)
    ans = 1
    for i in range(k):
      ans = (-ans * minus[i]) % mod

    print((-ans) % mod)
    return


  plus.sort(reverse = True)
  minus.sort()

  pi = 0
  mi = 0

  while k > 0:
    if pi + 1 == pn:
      if k % 2 == 0:
        mi += k
      else:
        pi += 1
        mi += k - 1

      break

    if pi == pn:
      mi += k
      break

    if mi + 1 >= mn:
      pi += k
      break

    if k == 1 or plus[pi] * plus[pi + 1] >= minus[mi] * minus[mi + 1]:
      pi += 1
      k -= 1
    else:
      mi += 2
      k -= 2

  ans = 1
  for i in range(pi):
    ans = (ans * plus[i]) % mod

  for i in range(mi):
    ans = (-ans * minus[i]) % mod

  print(ans % mod)


main()
n,m,x = map(int, input().split())
c_a = []
for i in range(n):
      c_a.append(list(map(int, input().split())))

min_sum_answer = 0
for i in range(n**2):
      min_sum = 0
      get_score = []
      for m in range(m):
         get_score.append(0)   
      for j in range(n):
            if i >> j % 2 ==1:
                  mun_sum += c_a[j][0]
                  for l in range(m):
                        get_score[l] += c_a[j][l+1]
           
      pre = 0 
      for s in range(m):
            if(get_score[s} < x):
                  pre = 1
                  break
      
      if pre == 0:
            if min_sum_answer == 0:
                  min_sum_answer = min_sum 
            elif min_sum_answer > min_sum:
                  min_sum_answer = min_sum 

if min_sum_answer == 0:
      print(-1)
else:
      print(min_sum_answer)

### FIXED CODE ###

n,m,x = map(int, input().split())
c_a = []
for i in range(n):
      c_a.append(list(map(int, input().split())))

min_sum_answer = -1
for i in range(2**n):
      min_sum = 0
      get_score = []
      for v in range(m):
         get_score.append(0)   
      for j in range(n):
            if (i >> j) & 1 ==1:
                  min_sum += c_a[j][0]
                  for l in range(m):
                        get_score[l] += c_a[j][l+1]
     
      #print(i)
      #print(min_sum)
      pre = 0 
      for s in range(m):
            if(get_score[s] < x):
                  pre = 1
                  break
      
      if pre == 0:
            if min_sum_answer == -1:
                  min_sum_answer = min_sum 
            elif min_sum_answer > min_sum:
                  min_sum_answer = min_sum 

if min_sum_answer == 0:
      print(-1)
else:
      print(min_sum_answer)
import numpy as np

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

AC = np.array([0]*N) # 正解を入れる箱
WA = np.array([0]*N) # 不正解を入れる箱

for _ in range(M):
    p, S = input().split()
    
    if AC[int(p)-1] ==0 and S == "WA": # まだ「正解が出てない & 不正解」
        WA[int(p)-1] += 1              # なら不正解の箱に＋１
    else:
        AC[int(p)-1] = 1               # それ以外は正解の箱に１
    
print(sum(AC), sum(WA))

### FIXED CODE ###

import numpy as np
 
N,M = map(int,input().split()) 
 
AC = np.array([0]*N)
WA = np.array([0]*N)
 
for i in range(M):
    p,S = input().split()
    
    if AC[int(p)-1] ==0 and S == "WA":
       WA[int(p)-1] += 1
    else:
        AC[int(p)-1] = 1

print(sum(AC),sum(AC*WA))
5 14 80


### FIXED CODE ###

a, b, c = map(int, input().split())
count = 0
for x in range(b - a + 1):
    if c % a == 0:
        count += 1
    a += 1
print(count)