Harryxun/stf_run huggingface dataset:
import numpy as np 
from numba import jit
n,k=map(int,input().split())
a=list(map(int,input().split()))
a=np.array(a,np.int64)

@njit('(i8[::1],)', cache=True)
def imo(a):
    imos=np.zeros(n+1,np.int64)
    for i in range(n):
        imos[max(0,i-a[i])]+=1
        imos[min(n,i+a[i]+1)]-=1
    
    immo=np.zeros(n+1,np.int64)
    immo=np.cumsum(imos)
    return immo[:n]


for _ in range(min(k,41)):
    a=imo(a)
    
print(*a)


### FIXED CODE ###

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

def imo(a):
    imos=[0]*(n+1)

    for i in range(n):
        imos[max(0,i-a[i])]+=1
        imos[min(n,i+a[i]+1)]-=1
    
    immo=[0]*(n+1)
    immo[0]=imos[0]
    for i in range(n):
        immo[i+1]=immo[i]+imos[i+1]

    return immo[:n]

for i in range(min(k,41)):
    a=imo(a)
    
print(*a)
a = map(int,input().split())
s= a[2] //a[0]
print(s*a[1])

### FIXED CODE ###

a,b,c= input().split()
s= int(c) // int(a)
print(s* int(b))
l = sum(map(int, input().split()))
n = sum(l)%3
if n == 0:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

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

if l[0] == l[1] + l[2] or l[1] == l[0] + l[2] or l[2] == l[0] + l[1]:
    print("Yes")
else:
    print("No")
n,a,b = map(int,input().split())


dp = [0] * int((n+2)/2)

dp[1] = n

for i in range(1,len(dp)-1):
    dp[i+1] = dp[i] * (dp[i] -1) /(i+1)

dpr = dp[::-1]

if int(n/2) * 2 == n: #nが偶数
    dpr = dpr[:-1]

dp += dpr

dp[-1] = 1

ans = sum(dp)

ans -= dp[a]
ans -= dp[b]
ans = ans%(10**9+7)

print(int(ans))


### FIXED CODE ###

from functools import reduce

n, a, b = map(int, input().split())
mod = 10 ** 9 + 7

#combination高速化の裏技
def comb(N, A, MOD):
    num = reduce(lambda x, y: x * y % MOD, range(N, N - A, -1))
    den = reduce(lambda x, y: x * y % MOD, range(1, A + 1))
    return num * pow(den, MOD - 2, MOD) % MOD

#powはmodを引数にしてあまりを計算してくれる
print((pow(2, n, mod = mod) - 1 - comb(n, a, mod) - comb(n, b, mod)) % mod)
a,b=map(int,input().split())
n = [list(map(int, input().split())) for i in range(a)]
for (i,j) in range()


### FIXED CODE ###

N, D = map(int, input().split())
l = [list(map(int, input().split())) for i in range(N)]

ans=0
s=0
for i in range(N):
  for j in range(i+1,N):
    s=0
    for d in range(D):
      s+=(l[i][d]-l[j][d])**2
    if s**(1/2)%1==0:
      ans+=1
print(ans)
print(input()+1)

### FIXED CODE ###

print(chr(ord(input())+1))
a,s=map(int,input().split())
if a>=3200:
    print(s)
else:
    print("red")

### FIXED CODE ###

a=int(input())
s=input()

if a >= 3200:
    print(s)
else:
    print("red")
from sys import stdin
import numpy as np
import math
from math import factorial
from itertools import combinations

n = int(stdin.readline().rstrip())
li = [stdin.readline().rstrip() for _ in range(n)]

lin = []

for i in range(n):
    if li[i][0] in "MARCH":
        lin.append(li[i][0])

liv = list(combinations(lin, 3))
point = 0
for i in liv:
    if i[0] != i[1] and i[0] != i[2] and i[2] != i[1]:
        point += 1
print(point)

### FIXED CODE ###

from sys import stdin
from itertools import combinations
from math import factorial

n = int(stdin.readline().rstrip())
li = [stdin.readline().rstrip() for _ in range(n)]

lin = [0]*5

for i in range(len(li)):
    if li[i][0] == "M":
        lin[0] += 1
    elif li[i][0] == "A":
        lin[1] += 1
    elif li[i][0] == "R":
        lin[2] += 1
    elif li[i][0] == "C":
        lin[3] += 1
    elif li[i][0] == "H":
        lin[4] += 1
        
lis = list(combinations(lin, 3))

point = 0
for i in lis:
    point += i[0]*i[1]*i[2]

print(point)
import sys

a, b = list(map(int, sys.stdin.readline(),split()))

print(a*b, 2*a+2*b)

### FIXED CODE ###

import sys

a, b = list(map(int, sys.stdin.readline().split()))

print(a*b, 2*a+2*b)
def popcount(n):
    return bin(n).count("1")

n = int(input())
x = input()
px = x.count("1")
a = px + 1
b = px - 1
tmpa = 0
tmpb = 0

A = [False] * n
for i in range(n):
    if x[i] == "1":
        tmpa += pow(2, n - i - 1, a)
        tmpa %= a
        tmpb += pow(2, n - i - 1, b)
        tmpb %= b

for i in range(1, n + 1):
    count = 1
    if x[i - 1] == "1":  # x[i] == "1" -> "0"
        y = tmpb - pow(2, n - i, b)
        y %= b
    else:  # x[i] == "0" -> "1"
        y = tmpa + pow(2, n - i, a)
        y %= a
    while y:
        y %= popcount(y)
        count += 1
    print(count)


### FIXED CODE ###

def popcount(n):
    return bin(n).count("1")

n = int(input())
x = input()
px = x.count("1")
a = px + 1
b = px - 1
tmpa = 0
tmpb = 0

if b == 0:
    for i in range(n):
        if x[i] == "1":
            tmpa += pow(2, n - i - 1, a)
            tmpa %= a

    for i in range(1, n + 1):
        count = 1
        if x[i - 1] == "1":  # x[i] == "1" -> "0"
            print(0)
            continue

        else:  # x[i] == "0" -> "1"
            y = tmpa + pow(2, n - i, a)
            y %= a
        while y:
            y %= popcount(y)
            count += 1
        print(count)

else:
    for i in range(n):
        if x[i] == "1":
            tmpa += pow(2, n - i - 1, a)
            tmpa %= a
            tmpb += pow(2, n - i - 1, b)
            tmpb %= b

    for i in range(1, n + 1):
        count = 1
        if x[i - 1] == "1":  # x[i] == "1" -> "0"
            y = tmpb - pow(2, n - i, b)
            y %= b
        else:  # x[i] == "0" -> "1"
            y = tmpa + pow(2, n - i, a)
            y %= a
        while y:
            y %= popcount(y)
            count += 1
        print(count)
N, H = map(int, input().split(' '))
a = []
b = []
for i in range(N):
    temp_a, temp_b = input().split(' ')
    a.append(int(temp_a))
    b.append(int(temp_b))
maxa = max(a)
c = [i for i in b if i > maxa]
sorted_b = sorted(b)[::-1]
i = 0
while(H > 0 and i != N):
    if maxa < sorted_b[i]:
        H -= sorted_b[i]
        i += 1
    else:
        break
left = 0
if H > 0:
    left = (H + maxa - 1) // maxa
print(i + left)


### FIXED CODE ###

print('2018'+input()[4:])
N, D = map(int, input().split())
sum=0
for i in range(0,N):
    X, Y = map(int, input().split())
    if sqrt(X^2+Y^2)<=D:
        sum=sum+1
print(sum)

### FIXED CODE ###

import math
N, D = map(int, input().split())
sum=0
for i in range(0,N):
    X, Y = map(int, input().split())
    if pow(X,2)+pow(Y,2)<=pow(D,2):
        sum=sum+1
print(sum)
import itertools

def main():
    n,m,x = map(int,input().split())
    ans = 0
    tmp = 10 ** 7
    ca = [[0]*m for i in range(n)]
    nn = [i for i in range(n)]

    for _ in range(n):
        ca[_] = list(map(int, input().split()))

    xx = list(itertools.combinations(nn))

    for ii in xx:
        ans = 0
        a = [0 for i in range(m)]

        for _ in ii:
            cost = ca[_][0]
            chk = 0
            for i in range(m):
                a[i] += ca[_][i+1]
                if a[i] < x:
                    chk = 1

            ans += cost
            if chk == 0:
                if tmp > ans:
                    tmp = ans
                break
            
        if tmp == 10 ** 7:
            print(-1)
            exit()

    print(tmp)

 
if __name__ == "__main__":
    main()

### FIXED CODE ###

def main():
    n,m,x = map(int,input().split())
    a = [[] for _ in range(n)]
    c = [0] * n

    INF = 10 ** 9
    ans = INF

    for i in range(n):
        ca = list(map(int,input().split()))
        c[i],a[i] = ca[0],ca[1:]

    for s in range(0,1<<n):
        smart = [0] * m
        cost = 0
        for i in range(n):
            if(s>>i) % 2 == 0:continue
            cost += c[i]
            for j in range(m):
                smart[j] += a[i][j]
        ok = True
        for i in range(m):
            if smart[i] < x:
                ok = False
        if ok:
            ans = min(ans,cost)
    if ans == INF:
        ans = -1
    
    print(ans)

if __name__ == "__main__":
    main()
import sys
INF = 1 << 60
MOD = 10**9 + 7 # 998244353
sys.setrecursionlimit(2147483647)
input = lambda:sys.stdin.readline().rstrip()
from scipy.sparse import csr_matrix
from scipy.sparse.csgraph import maximum_bipartite_matching
def resolve():
    n = int(input())
    A = [tuple(map(int, input().split())) for _ in range(n)]
    B = [tuple(map(int, input().split())) for _ in range(n)]

    graph = csr_matrix([[int(A[i][0] < B[j][0] and A[i][1] < B[j][1]) for j in range(n)] for i in range(n)])
    ans = 0
    for a in maximum_bipartite_matching(graph):
        if a != -1:
            ans += 1
    print(ans)
resolve()

### FIXED CODE ###

import sys
sys.setrecursionlimit(2147483647)
INF=float("inf")
MOD=10**9+7
input=lambda :sys.stdin.readline().rstrip()

from collections import deque
class Dinic:
    def __init__(self,n):
        self.__n=n
        self.__E=[[] for _ in range(n)]
        self.__depth=None
        self.__progress=None

    def add_link(self,u,v,w):
        self.__E[u].append([v,w,len(self.__E[v])])
        self.__E[v].append([u,0,len(self.__E[u])-1])

    def __bfs(self,s):
        depth=[-1]*self.__n
        depth[s]=0
        Q=deque([s])
        while(Q):
            v=Q.popleft()
            for nv,w,rev in self.__E[v]:
                if(w>0 and depth[nv]<0):
                    depth[nv]=depth[v]+1
                    Q.append(nv)
        self.__depth=depth

    def __dfs(self,v,t,flow):
        if(v==t): return flow
        for i in range(self.__progress[v],len(self.__E[v])):
            self.__progress[v]=i
            nv,w,rev=self.__E[v][i]
            if(w==0 or self.__depth[v]>=self.__depth[nv]): continue
            d=self.__dfs(nv,t,min(flow,w))
            if(d==0): continue
            self.__E[v][i][1]-=d
            self.__E[nv][rev][1]+=d
            return d
        return 0

    def flow(self,s,t):
        flow=0
        while(True):
            self.__bfs(s)
            if(self.__depth[t]<0): return flow
            self.__progress=[0]*self.__n
            current_flow=self.__dfs(s,t,INF)
            while(current_flow):
                flow+=current_flow
                current_flow=self.__dfs(s,t,INF)

def resolve():
    n=int(input())
    AB=[tuple(map(int,input().split())) for _ in range(n)]
    CD=[tuple(map(int,input().split())) for _ in range(n)]

    # bipartite の maximum matching で解く
    mf=Dinic(2*n+2)
    for i in range(n):
        mf.add_link(0,i+1,1)
        mf.add_link(n+i+1,2*n+1,1)
    for i in range(n):
        a,b=AB[i]
        for j in range(n):
            c,d=CD[j]
            if(a<c and b<d):
                mf.add_link(i+1,n+j+1,1)

    print(mf.flow(0,2*n+1))
resolve()
a,b,c = map(int,input().sprit())
s = a + b + c
if s > 21:
  print("bust")
else:
  print("win")

### FIXED CODE ###

a,b,c = map(int,input().split())
s = a + b + c
if s > 21:
  print("bust")
else:
  print("win")
N,Y = map(int,input().split())
count=0
for x in range(N+1):
    for y in range(N+1):
        if x+y >N:
            break
        else:
            money = 10000*x + 5000*y + 1000*(N-x-y)
            if money == Y:
                count=1
                print('{} {} {}'.format(x,y,N-x-y)
                break
    else:
        continue
    break
if count == 0:
    print('-1 -1 -1')

### FIXED CODE ###

N,Y = map(int,input().split())
count=0
for x in range(N+1):
    for y in range(N+1):
        if x+y >N:
            break
        else:
            money = 10000*x + 5000*y + 1000*(N-x-y)
            if money == Y:
                count=1
                print('{} {} {}'.format(x,y,N-x-y))
                break
    if count == 1:
        break
if count == 0:
    print('-1 -1 -1')
import math 

x = int(input())
a = []
if x == 1:
  print(1)
else:
  for i in range(1,x):
    for j in range(2,32):
      if math.log(i,j).is_integer() == True:
        a.append(i)
print(max(a))


### FIXED CODE ###

x = int(input())
a = []
for i in range(1,32):
  for j in range(2,9):
    if i ** j <= x:
      a.append(i**j)
print(max(a))
def f(k):
    def lunlun(n):
        s = [int(i) for i in str(n)]
        for i in range(len(s) - 1):
            if abs(s[i] - s[i + 1]) > 1:
                return False
        return True
    cum_npi = [0, 9, 35, 110, 327, 956, 2782, 8089, 23527, 68468, 199368]
    for i, begin in enumerate(cum_npi):
        if k < begin:
            begin = cum_npi[i-1]
            break
    print(f"begin = {begin}")
    found = begin
    while found != k:
        begin += 1
        if lunlun(begin):
            found += 1
            if found == k:
                break
    print(begin)

f(int(input()))


### FIXED CODE ###

# ABC161D
def f(k):
    if 1 <= k <= 9:
        print(k)
    else:
        nxt = [[0,1], [0,1,2], [1,2,3], [2,3,4], [3,4,5], [4,5,6], [5,6,7], [6,7,8], [7,8,9], [8,9]]
        cum_npi = [0, 9, 35, 110, 327, 956, 2782, 8089, 23527, 68468, 199368]
        for length, begin in enumerate(cum_npi):
            if k < begin:
                found = cum_npi[length - 1]
                break
        begin = 10 ** (length - 1)
        length, begin, found
        k -= found
        x = [[]] * (length + 1)
        x[1] = list(range(1, 10))
        x

        terminate = False
        i = 1
        while True:
            #print(f"a) i = {i}  x = {x}")
            if len(x[i]): # len(x[i])
                digit = x[i][0]
                if i < length: # i, length
                    i += 1
                    x[i] = nxt[digit].copy()
                    #print(f"x) digit = {digit}  nxt[digit] = {nxt[digit]}  i = {i}  x[i] = {x[i]}")
                    #print(f"b) i = {i}  x = {x}")
                    if i == length: # i, length
                        while len(x[i]): # i, x[i]
                            k -= 1
                            #print(f"c) i = {i}  x = {x}, k = {k}")
                            if k == 0:
                                x.pop(0)
                                #print("answer =", x)
                                ans = "".join([str(j.pop(0)) for j in x])
                                print(ans)
                                terminate = True
                                break
                            else:
                                x[i].pop(0)
                            #print(f"d) i = {i}  x = {x}")
                        else:
                            #print(f"e) i = {i}  x = {x}")
                            while len(x[i]) == 0:
                                i -= 1
                                x[i].pop(0)
                        if terminate:
                            break

f(int(input()))
w,h,x,y,r = map(int,raw_input().split())
 
if x<r:
 print 'No'
elif y<r:
 print'No'
elif w-x<r:
 print 'No'
elif h-y<r:
 print 'No'
else :
print 'Yes'

### FIXED CODE ###

W, H, x, y, r = map(int, raw_input().split())
 
if x < r or x + r > W or y < r or y + r >H:
  print "No"
else:
 print "Yes"
N, M, K = map(int, input().split())
 
A = list(map(int, input().split()))
B = list(map(int, input().split()))
 
def solve(A, N, B, M, K):
  
  def cumsum(l):
    rt = [0]
    s = 0
    for n in l:
      s += n
      rt.append(s)
    return rt
  
  preA = cumsum(A)
  preB = cumsum(B)
  
  total = N + M
  s, e = 0, total
  
  def can_read(num):
    for i in range(N + 1):
      j = num - i
      if j < (M + 1) and (preA[i] + preB[j]) <= K:
      	return True
    return False

  res = 0
  while s < e:
    mid = s + (e - s) // 2
    can = can_read(mid)
    
    if can:
      res = mid
      s = mid + 1
    else:
      e = mid - 1
  
  return res

res = solve(A, N, B, M, K)
print(res)

### FIXED CODE ###

N, M, K = map(int, input().split())
 
A = list(map(int, input().split()))
B = list(map(int, input().split()))
 
def solve(A, N, B, M, K):
  
  def cumsum(l):
    rt = [0]
    s = 0
    for n in l:
      s += n
      rt.append(s)
    return rt
  
  preA = cumsum(A)
  preB = cumsum(B)
  
  s, e = 0, N + M
  
  def can_read(num):
    for i in range(N + 1):
      j = num - i
      if j >= 0 and j < (M + 1) and (preA[i] + preB[j]) <= K:
      	return True
    return False

  res = 0
  while s <= e:
    mid = s + (e - s) // 2
    can = can_read(mid)
    
    if can:
      res = mid
      s = mid + 1
    else:
      e = mid - 1
  
  return res

res = solve(A, N, B, M, K)

print(res)
import sys

N =int(input())

for a in range(1,10):
  for b in range(1,10):
    if a*b == N:
      print('yes')
      sys.exit()
print('no')

### FIXED CODE ###

A,B = map(int, input().split())
if (A<=9) & (B<=9):
  print(A*B)
else:
  print(-1)
import sys
#from scipy.special import comb
#from scipy.misc import comb

from operator import mul
from functools import reduce

def cmb(n,r):
    r = min(n-r,r)
    if r == 0: return 1
    over = reduce(mul, range(n, n - r, -1))
    under = reduce(mul, range(1,r + 1))
    return over // under

sys.setrecursionlimit(100000)
nCr = {}
def cmb(n, r):
    if r == 0 or r == n: return 1
    if r == 1: return n
    if (n,r) in nCr: return nCr[(n,r)]
    nCr[(n,r)] = cmb(n-1,r) + cmb(n-1,r-1)
    return nCr[(n,r)]


def cmb(n, r):
    if n - r < r: r = n - r
    if r == 0: return 1
    if r == 1: return n

    numerator = [n - r + k + 1 for k in range(r)]
    denominator = [k + 1 for k in range(r)]

    for p in range(2,r+1):
        pivot = denominator[p - 1]
        if pivot > 1:
            offset = (n - r) % p
            for k in range(p-1,r,p):
                numerator[k - offset] /= pivot
                denominator[k] /= pivot

    result = 1
    for k in range(r):
        if numerator[k] > 1:
            result *= int(numerator[k])

    return result

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

A = [0]*M

for i in range(M):
    A[i] = int(input())

A.append(N+1)

def step_comb(L):
    c = 0
    if L==1 or L == 0:
        c = 1
    else:
        for i in range(L//2 +1):
            j = L - 2*i
            #c += comb(j+i, i, exact=True)
            c += cmb(j+i, i)
    return c

# DP version
DP = [0]*N
DP[0] = 1
# １段の階段を登るやり方の数
DP[1] = 1
# 2段の階段を登るやり方の数
DP[2] = 2

def step_comb(L):
    if DP[L]>0:
        return DP[L]
    DP[L] = step_comb(L-1) + step_comb(L-2)
    return DP[L]
    
total_comb = 1
NOW = 0
for a in A:
    if NOW == a:
        print(0)
        sys.exit()
    L = a-1-NOW
    total_comb *= step_comb(L)
    NOW = a + 1
    
print(total_comb % 1000000007 )


### FIXED CODE ###

import sys
sys.setrecursionlimit(100000000)

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

if M == 0:
    A = []
else:
    A = [0]*M
    for i in range(M):
        A[i] = int(input())

A.append(N+1)

# DP version
DP = [0]*(N+1)
DP[0] = 1
# １段の階段を登るやり方の数
DP[1] = 1
# 2段の階段を登るやり方の数
#DP[2] = 2

for i in range(2,N+1):
    DP[i] = DP[i-1] + DP[i-2]

def step_comb(L):
    if DP[L]>0:
        return DP[L]
    DP[L] = step_comb(L-1) + step_comb(L-2)
    return DP[L]
    
total_comb = 1
NOW = 0
for a in A:
    if NOW == a:
        print(0)
        sys.exit()
    L = a-1-NOW
    total_comb *= step_comb(L)
    NOW = a + 1
    if NOW == N:
        break
    
print(total_comb % 1000000007 )
n=int(raw_input())
t=map(int,raw_input().split())
m=int(raw_input())
xt=[map(int,raw_input().split()) for _ in xrange(m)]
ans=[0]*m
for i in xrange(m):
    tmp=t
    tmp[xt[i][0]-1]=xt[i][1]
    for j in xrange(n):
        ans[i]+=tmp[j]
for j in xrange(n):
    print(ans[j])


### FIXED CODE ###

a,op,b=raw_input().split()
if op=="+":
    print(int(a)+int(b))
else:
    print(int(a)-int(b))
a=[int(input()) for i in range (5)]
m=[]
s=0
for i in range(5):
    x=a[i]%10
    if x!=0:
        s+=a[i]+10-x
    else:
        s+=a[i]
for k in range(5):
    y=a[k]%10
    b=s
    if y!=0:
        n=10-y
        b=s-n
        m.append(b)
    else:
        m.append(b)
print(min(m)

### FIXED CODE ###

a=[int(input()) for i in range (5)]
m=[]
s=0
for j in range(5):
    x=a[j]%10
    if x!=0:
        s+=a[j]+10-x
    else:
        s+=a[j]
for k in range(5):
    y=a[k]%10
    b=s
    if y!=0:
        n=10-y
        b=b-n
        m.append(b)
    else:
        m.append(b)
print(min(m))
o=998244353
f=[1]
for i in range(1,2500100):f.append(f[-1]*i%o)
def c(n,k):return f[n]*pow(f[n-k],o-2,o)*pow(f[k],o-2,o)
n,m=map(int,input().split())
w=3*m
u=n-1
a=c(w+u,u)-n*c(n+m-2,u)
if u>m:
 for i in range(m+1,min(w,n)+1):
  if w-i+1&1:a-=c(n,i)*c((w-i)//2+u,u)
print(a%o)

### FIXED CODE ###

n=int(input())
a = n//(10**9)+1
b = 10**9-(n%(10**9))
if n%(10**9) == 0:
  print(0,0,10**9,0,1,a-1)
else:
  print(0,0,10**9,b,1,a)
import math

a, b = map(int, input().split())  # 複数数値入力

A = list()
B = list()

for i in range(1, int(math.log2(b))+2):
    tmp = b // (2 ** i) * 2 ** (i - 1)

    if b % (2 ** i) < (2 ** (i-1)):
        plus = 0
    else:
        plus = b % (2 ** i) - 2 ** (i-1) + 1

    B.append(tmp+plus)

for i in range(1, int(math.log2(a-1))+2):
    tmp = (a-1) // (2 ** i) * 2 ** (i - 1)

    if (a-1) % (2 ** i) < (2 ** (i-1)):
        plus = 0
    else:
        plus = (a-1) % (2 ** i) - 2 ** (i-1) + 1

    A.append(tmp + plus)

ans = 0
for i in range(0, int(math.log2(b)) + 1):
    if i >= len(A):
        ans += (B[i]) % 2 * 10 ** i
    else:
        ans += (B[i] - A[i]) % 2 * 10 ** i

print(int(str(ans), 2))


### FIXED CODE ###

import math

a, b = map(int, input().split())  # 複数数値入力

A = list()
B = list()

if b == 0:
    B = [0]
elif b == 1:
    B = [1]
else:
    for i in range(1, int(math.log2(b))+2):
        tmp = b // (2 ** i) * 2 ** (i - 1)

        if b % (2 ** i) < (2 ** (i-1)):
            plus = 0
        else:
            plus = b % (2 ** i) - 2 ** (i-1) + 1

        B.append(tmp + plus)

if a == 0:
    A = [0]
elif a == 1:
    A = [0]
else:
    for i in range(1, int(math.log2(a-1))+2):
        tmp = (a-1) // (2 ** i) * 2 ** (i - 1)

        if (a-1) % (2 ** i) < (2 ** (i-1)):
            plus = 0
        else:
            plus = (a-1) % (2 ** i) - 2 ** (i-1) + 1

        A.append(tmp + plus)

if b == 0:
    print(0)
else:
    ans = 0
    for i in range(0, int(math.log2(b)) + 1):
        if i >= len(A):
            ans += (B[i]) % 2 * 10 ** i
        else:
            ans += (B[i] - A[i]) % 2 * 10 ** i

    print(int(str(ans), 2))
import sys
input = sys.stdin.buffer.readline
MOD = 10**9 + 7
N, K = map(int, input().split())
A = list(map(int, (input().split())))
ap = []
neg_cnt = 0
zero_cnt = 0
for a in A:
    if a<0:
        ap.append((-a, -1))
        neg_cnt += 1
    elif a==0:
        ap.append((0, 0))
        zero_cnt += 1
    else:
        ap.append((a, 1))
ap.sort(reverse=True)
# print(ap)
ans = 1
if neg_cnt==N and K%2:      # 正が無く、答えは負
    for i in range(K):
        ans *= ap[N-i-1][0] * ap[N-i-1][1]
        ans %= MOD
else:                       # 答えは正
    neg_num = 0
    for i in range(K):
        if ap[i][1] == -1:
            neg_num += 1
    if neg_num % 2:     # 負の数が奇数だったら、-1して偶数回にし、K+1個見る
        neg_num -= 1
        K += 1
    for i in range(K):
        if ap[i][1] == -1:  # 負の数だった、neg_num回まで
            if neg_num == 0:
                continue
            else:
                neg_num -= 1
        ans *= ap[i][0] * ap[i][1]
        ans %= MOD

print(ans)

### FIXED CODE ###

import sys
input = sys.stdin.buffer.readline
MOD = 10**9 + 7
N, K = map(int, input().split())
A = list(map(int, (input().split())))
pos, neg = [], []
for a in A:
    if a<0:
        neg.append(a)   # 負
    else:
        pos.append(a)   # 0以上
if pos:
    if N==K:    # 全て選択で負の数が奇数ならfalse（正にできない）
        ok = (len(neg)%2 == 0)
    else:
        ok = True
else:
    ok = (K%2 == 0) # すべて負で奇数ならfalse（正にできない）
ans = 1
if ok == False: # false（正にできない）場合、絶対値が小さいものからk個かける
    A.sort(key=abs)
    for i in range(K):
        ans *= A[i]
        ans %= MOD
else:
    pos.sort()              # 後ろから取っていくので正は昇順
    neg.sort(reverse=True)  # 後ろから取っていくので負は降順
    if K%2:
        ans *= pos.pop()    # kが奇数個なら1個は正を選ぶ
    p = []  # 2個ずつかけた数を格納
    while len(pos)>=2:
        p.append(pos.pop() * pos.pop())
    while len(neg)>=2:  # 負を2回かけるのでxは正
        p.append(neg.pop() * neg.pop())
    p.sort(reverse=True)
    for i in range(K//2):   # 降順にk//2個見ていく
        ans *= p[i]
        ans %= MOD
print(ans)
N = int(input())
line = list(map(int,input().split()))
a = 0
p = []
for i in line:
    p.append(i)
    m = min(p)
    if m >= i:
       a += 1

print(a)

### FIXED CODE ###

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

if n == m :
    print("Yes")
else :
    print("No")
a,b=map(int,input().split())

if a*b % 2 =0:
  print("Even")
else:
  print("Odd")

### FIXED CODE ###

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