Harryxun/stf_run huggingface dataset:
import math
n, init = map(int,input().split())
x = list(map(lambda x: abs(int(x)-init), input().split()))
g = x[0]
for i in range(n):
    g = math.gcd(g,x[i])
print(g)


### FIXED CODE ###

n, init = map(int,input().split())
x = list(map(lambda x: abs(int(x)-init), input().split()))
g = x[0]
def gcd(x, y):
    if y == 0:
        return x
    return gcd(y, x%y)
for i in range(1,n):
    g = gcd(g,x[i])
print(g)
c = list(input().split())
print(len(set(c))

### FIXED CODE ###

c = list(input().split())
print(len(set(c)))
def cal(k):
  for a,b in AB:
    tmp = k-a
    if tmp<0:
      tmp = 0
    new = dp[tmp]+b
    if new<dp[k]:
      dp[k]=new
def main():
  H,N = map(int,input().split())
  AB = [list(map(int,input().split())) for _ in range(N)]
  mi_a,mi_b = min(AB,key = lambda x:x[1])
  INF = float('inf')
  dp = [0]+[mi_b]*mi_a+[INF]*H
  for i in range(mi_a+1,H+1):
    cal(i)

  print(dp[H])
main()


### FIXED CODE ###

H,N = map(int,input().split())
AB = [list(map(int,input().split())) for _ in range(N)]
INF = float('inf')
dp = [INF]*(H+1)
dp[0] = 0
for i in range(1,H+1):
  for k in AB:
    a = k[0]
    b = k[1]
    tmp = max(0,i-a)
    dp[i] = min(dp[i],dp[tmp]+b)
    
print(dp[H])
N, Y = map(int, input().split(" "))
found = False
for x in range(N + 1):
    if 10000 * x + 5000 * (N - x) + 1000 * (N - x) < Y:
        continue
    for y in range(N - x + 1):
        if 10000 * x + 5000 * y + 1000 * (N - x - y) == Y:
            print("{} {} {}".format(x,y,z))
            found = True
            break
        if found:
            break
    if found:
        break
else:
    print("-1 -1 -1")

### FIXED CODE ###

N, Y = map(int, input().split(" "))
found = False
for x in range(N + 1):
    if 10000 * x + 5000 * (N - x) + 1000 * (N - x) < Y:
        continue
    for y in range(N - x + 1):
        if 10000 * x + 5000 * y + 1000 * (N - x - y) == Y:
            print("{} {} {}".format(x,y,N - x - y))
            found = True
            break
        if found:
            break
    if found:
        break
else:
    print("-1 -1 -1")
import sys
sys.setrecursionlimit(10**7)
input = sys.stdin.readline
N = int(input())
AB = [tuple(map(int,input().split())) for i in range(N-1)]
if N==2:
    print(1,2)
    exit()
es = [[] for i in range(N)]
for a,b in AB:
    a,b = a-1,b-1
    es[a].append(b)
    es[b].append(a)

depth = [-1]*N
depth[0] = 0
def dfs(v,p=-1):
    for to in es[v]:
        if to==p: continue
        depth[to] = depth[v] + 1
        dfs(to,v)
dfs(0)

mem = [[[] for _ in range(2)] for _ in range(4)]
for i,d in enumerate(depth):
    if d==0: continue
    if d%2:
        mem[0][0].append(i)
        mem[1][1].append(i)
    else:
        mem[0][1].append(i)
        mem[1][0].append(i)
    if d==1:
        mem[2][1].append(i)
        mem[3][0].append(i)
    else:
        if ((d-2)//3)%2:
            mem[2][0].append(i)
            mem[3][1].append(i)
        else:
            mem[2][1].append(i)
            mem[3][0].append(i)

for k in range(4):
    ans = [None] * N
    for i in range(1,N+1):
        if i==3:
            ans[0] = 3
            continue
        if i%3==0:
            if len(mem[k][0])==0 and len(mem[k][1])==0:
                break
            if len(mem[k][0]) <= len(mem[k][1]):
                j = mem[k][1].pop()
            else:
                j = mem[k][0].pop()
        elif i%3==1:
            if len(mem[k][0])==0:
                break
            j = mem[k][0].pop()
        else:
            if len(mem[k][1])==0:
                break
            j = mem[k][1].pop()
        ans[j] = i
    else:
        print(*ans)
        exit()
assert False

### FIXED CODE ###

import sys
sys.setrecursionlimit(10**7)
input = sys.stdin.readline
N = int(input())
AB = [tuple(map(int,input().split())) for i in range(N-1)]
if N==2:
    print(1,2)
    exit()
es = [[] for i in range(N)]
for a,b in AB:
    a,b = a-1,b-1
    es[a].append(b)
    es[b].append(a)

depth = [-1]*N
depth[0] = 0
def dfs(v,p=-1):
    for to in es[v]:
        if to==p: continue
        depth[to] = depth[v] + 1
        dfs(to,v)
dfs(0)

g1 = []
g2 = []
for i,d in enumerate(depth):
    if d%2:
        g2.append(i)
    else:
        g1.append(i)
if len(g1) < len(g2):
    g1,g2 = g2,g1

ans = [None] * N
if len(g2) <= N//3:
    for n in range(1,N+1):
        if n%3==0:
            if g2:
                i = g2.pop()
            else:
                i = g1.pop()
        else:
            i = g1.pop()
        ans[i] = n
else:
    for n in range(1,N+1,3):
        i = g1.pop()
        ans[i] = n
    for n in range(2,N+1,3):
        i = g2.pop()
        ans[i] = n
    for n in range(3,N+1,3):
        if g1:
            i = g1.pop()
        else:
            i = g2.pop()
        ans[i] = n
print(*ans)
import numpy as np
h,n = map(int,input().split())
dp = [np.inf] * (h+1)
dp[0] = 0
for i in range(n):
    a, b = map(int, input().split())
    for j in range(h):
        nj = min(j+a, h)
        dp[nj] = min(dp[nj], dp[j]+b)
print(dp[h])


### FIXED CODE ###

h,n = map(int,input().split())
dp = [int(1e18)] * (h+1)
dp[0] = 0
for i in range(n):
    a, b = map(int, input().split())
    for j in range(h):
        nj = min(j+a, h)
        dp[nj] = min(dp[nj], dp[j]+b)
print(dp[h])
ip=[int(x) for x in input().split()]
n=list(range(ip[0],ip[1]+1))
xl=n[:ip[2]]
xh=n[-ip[2]:]
ans=xl+xh
anset=list(set(ans))
anset.sort()
for i in anset:
	print(i)

### FIXED CODE ###

ip=[int(x) for x in input().split()]
a=ip[0]
b=ip[1]
k=ip[2]
if k>=(b-a+1):
  for i in range(a,b+1):
    print(i)
else:
	lw=list(range(a,a+k))
	hg=list(range(b-k+1,b+1))
	res=list(set(lw+hg))
	res.sort()
	for i in res:
  		print(i)
n,k,q = map(int, input().split())
a = [int(input()) for _ in range(q)]
p = [0]*n

if k>q:
    for i in range(n):
        print('Yes')
    exit()
else:
    for i in range(n):
        p[i]=a.count(i+1)
        if k+p[i]-q<=0:
            print('No')
        else:
            print('Yes')

### FIXED CODE ###

S = input()

if S =='Sunny':
    print('Cloudy')
if S =='Cloudy':
    print('Rainy')
if S =='Rainy':
    print('Sunny')
import sys

K, S = sys.stdin.readlines()[0].strip().split(' ')
total_pattern = 0

def recursive_solver(state):
  for k in K:
    s = recursive_solver(state - k)
    if s == 0:
      total_pattern += 1
    elif s < 0:
      return -1
    else:
      return recursive_solver(s)

recursive_solver(S)
print(total_patter)

### FIXED CODE ###

import sys

K, S = [int(_) for _ in sys.stdin.readlines()[0].strip().split(' ')]
total_pattern = 0

for x in range(K+1):
  for y in range(K+1):
    if 0 <= S - (x + y) <= K:
      total_pattern += 1
      
print(total_pattern)
num = int(input())
a=[0*num for i in range(num)]
boss=input().split(" ")
for i in range(num-1):
  a[int(boss[i])-1]+=1
for i in range(num):
  print(a[i])

### FIXED CODE ###

r=int(input())
print(r*2*3.14)
N = int(input())
N = N+1
sum = 0

import math

def gcd(*numbers):
    return reduce(math.gcd, numbers)

for i in range(1, N):
    for j in range(1, N):
        for k in range(1, N):
            sum += (gcd(gcd(i, j), k)

print( sum )


### FIXED CODE ###

N = int(input())
N = N+1
sum = 0

from math import gcd

for i in range(1, N):
    for j in range(1, N):
        for k in range(1, N):
            sum += gcd(gcd(i, j), k)

print( sum )
a, b = map(int, input().split())
c = list(map(int, input().split()))
d = sum(c)
print(a-d)

### FIXED CODE ###

import math

r=float(input())

L=2*math.pi*r

print(L)
import math
from decimal import Decimal

N = int(input())
T, A = [Decimal(x) for x in input().split()]

for i in range(1,N):
        T2, A2 = [Decimal(x) for x in input().split()]
        n = max(math.ceil(T/T2),math.ceil(A/A2)
        T = T2*n
        A = A2*n

print(T + A)

### FIXED CODE ###

import math
from decimal import Decimal

N = int(input())
T, A = [Decimal(x) for x in input().split()]

for i in range(1,N):
        T2, A2 = [Decimal(x) for x in input().split()]
        n = Decimal(max(math.ceil(T/T2),math.ceil(A/A2)))
        T = T2 * n
        A = A2 * n

print(T+A)
N = int(input())
if N%2 ==1:10

    N +=1
print(int(N/2))

### FIXED CODE ###

N = int(input())
if N%2 ==1:
    N += 1
print(int(N/2))
N = int(input())
AC = 0
WA = 0
TLE = 0
RE = 0
for i in range(N):
  tmp = input()
  if(tmp == "AC"):
    AC += 1
  if(tmp == "WA"):
    WA += 1
  if(tmp == "TLE"):
    TLE += 1
  else:
    RE += 1
print(AC x str(AC))
print(WA x str(WA))
print(TLE x str(TLE))
print(RE x str(RE))

### FIXED CODE ###

N = int(input())
AC = 0
WA = 0
TLE = 0
RE = 0
for i in range(N):
  tmp = input()
  if(tmp == "AC"):
    AC += 1
  if(tmp == "WA"):
    WA += 1
  if(tmp == "TLE"):
    TLE += 1
  if(tmp == "RE"):
    RE += 1
print("AC x "+str(AC))
print("WA x " +str(WA))
print("TLE x " +str(TLE))
print("RE x " +str(RE))
from itertools import product

X, Y, Z, K = list(map(int, input().split()))
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))

AB = [a + b for a, b in product(A, B)]
AB.sort(reverse=True)

ABC = [ab + c for ab, c in product(AB[:K], C)]
ABC.sort(reverse=True)

for abc in ABC[:K]:
    print(abc)

### FIXED CODE ###

a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())

antenna = [a, b, c, d, e]
is_ok = True
for i in range(len(antenna)):
    for j in range(i+1, len(antenna)):
        if antenna[j] - antenna[i] > k:
            is_ok = False

if is_ok:
    print('Yay!')
else:
    print(':(')
from sys import stdin
A,B,C = [int(x) for x in stdin.readline().rstrip().split()]
def factorize(n):
    fct = []  # prime factor
    b, e = 2, 0  # base, exponent
    while b * b <= n:
        while n % b == 0:
            n = n // b
            e = e + 1
        if e > 0:
            fct.append((b, e))
        b, e = b + 1, 0
    if n > 1:
        fct.append((n, 1))
    return fct

a = factorize(A)[0][1]
b = factorize(B)[0][1]
c = factorize(C)[0][1]

ans = max(a,b,c)
if ans == 1:
    ans = -1
print(ans)

### FIXED CODE ###

from sys import stdin
A,B,C = [int(x) for x in stdin.readline().rstrip().split()]

ans = 0

if A == B == C:
    if A % 2 == 0:
        ans = -1
    else:
        ans = 0
elif A % 2 == 1 or B % 2 == 1 or C % 2 == 1:
     ans = 0
else:
    for _ in range(1000):
        ta = A
        tb = B
        tc = C
        A = (tb/2) + (tc/2)
        B = (ta/2) + (tc/2)
        C = (ta/2) + (tb/2)
        ans += 1
        if A % 2 == 1 or B % 2 == 1 or C % 2 == 1:
            break
        
print(ans)
A=int(input())
B=int(input())
T=int(input())
print(T/A*B)

### FIXED CODE ###

A,B,T=map(int,input().split())
print(T//A*B)
import sys

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

N = int(readline())
S,T = map(int, readline().split())

ans = []

for i in range(N):
  ans.append(S[i])
  ans.append(T[i])

print(''.join(ans))
  

### FIXED CODE ###

import sys
 
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
 
N = int(readline())
S,T = read().decode('utf-8').rstrip().split()
 
ans = []
 
for i in range(N):
  ans.append(S[i])
  ans.append(T[i])


print(''.join(ans))
n,k = map(int,input().split())
A = list(map(int,input().split()))
MOD = 10**9+7

cumsum = [1]
for a in A:
  cumsum.append(cumsum[-1]*a)

res = -10**16
for i in range(k, n+1):
  res = max(res, cumsum[i]//cumsum[i-k])

print(res%MOD)

### FIXED CODE ###

n,k = map(int,input().split())
A = list(map(int,input().split()))
MOD = 10**9+7
# s=正の数、t=負の数
s,t = [], []
for a in A:
  if a<0:
    t.append(a)
  else:
    s.append(a)

S = len(s)
T = len(t)
ok = False
if (S>0):
  if n==k:
    # すべての負の数をペアにできる
    ok = T%2==0
  else:
    # 負の数は考慮しない
    ok = True
else:
  # kが偶数個
  ok = (k%2==0)

ans = 1
if not ok:
  A.sort(key=lambda x: abs(x))
  for i in range(k):
    ans *= A[i]
    ans %= MOD
else:
  s.sort()
  t.sort(reverse=True)
  if k%2==1:
    ans *= s.pop()
    ans %= MOD

  p = []
  while len(s) >= 2:
    x = s.pop()
    x *= s.pop()
    p.append(x)

  while len(t) >= 2:
    x = t.pop()
    x *= t.pop()
    p.append(x)

  p.sort(reverse=True)
  for i in range(k//2):
    ans *= p[i]
    ans %= MOD

print(ans % MOD)
N,M = map(int,input().split())
LIKE = set()

for i in range(N):
  AK = list(map(int,input().split()))
  LIKE |= AK[1:]

print(len(LIKE))
            

### FIXED CODE ###

N,M = map(int,input().split())
LIKE = [True] * M

for i in range(N):
  KA = list(map(int,input().split()))
  A = KA[1:]
  
  for i in range(M):
    if not (i+1) in A:
      LIKE[i] = False
      
print(LIKE.count(True))
from math import factorial

mod=1000000000+7

def C(n,k):
    N=(factorial(n))
    K=(factorial(k))
    N_K=(factorial(n - k))
    return int( ( N // K // N_K )%mod )

n,k=list(map(int, input().split()))
blue=k
red=n-k
for i in range(1,blue+1):
    print(C(red+1,i)*C(blue-1,i-1)%mod)

### FIXED CODE ###

from math import factorial

mod=1000000000+7

def C(n,k):
    N=(factorial(n))
    K=(factorial(k))
    N_K=(factorial(n - k))
    return int( ( N // K // N_K )%mod )

n,k=list(map(int, input().split()))
blue=k
red=n-k
for i in range(1,blue+1):
    if i > red+1:
        print(0)
    else:
        print( (C(red+1,i)%mod)*(C(blue-1,i-1)%mod)%mod)
s = int(input())
side = s/3

print(side^3)


### FIXED CODE ###

s = int(input())
side = s/3
ans = pow(side,3)
print(ans)
n=int(input())
a=list(map(int,input().split()))
cnt=0
for i in range(n):
  while a[i]%2=0:
    a[i]=a[i]/2
    cnt+=1
    
print(cnt)
  

### FIXED CODE ###

n=int(input())
a=list(map(int,input().split()))
cnt=0
for i in range(n):
  while a[i]%2==0:
    a[i]=a[i]/2
    cnt+=1
    
print(cnt)
S = str(input())
K = int(input())

if len(S) == 1:
        print(S[0])
        exit(0)

i = 0
while S[i] == '1':
        i += 1
print(S[i])


### FIXED CODE ###

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

if len(S) == 1:
        print(S[0])
        exit(0)

i = 0
while S[i] == '1' and i <= len(S)-2:
        if K <= i + 1:
                print(S[i])
                exit(0)
        i += 1
print(S[i])
# -*- coding: utf-8

a, op, b = input().split()
if op == '+':
    print(a + b)
else:
    print(a - b)

### FIXED CODE ###

# -*- coding: utf-8

a, op, b = input().split()
if op == '+':
    print(int(a) + int(b))
else:
    print(int(a) - int(b))
N,K = map(int, input().split())
S = Input()
dir = {'A':'a', 'B':'b', 'C':'c'}

print(S[0:K-1] + dir[S[K-1]]+ S[K::])


### FIXED CODE ###

N,K = map(int, input().split())
S = input()
dir = {'A':'a', 'B':'b', 'C':'c'}

print(S[0:K-1] + dir[S[K-1]]+ S[K::])
from collection import Counter
S = list(input())

C = Counter(S)

ok = True
for s,x in C.items():
  if x % 2 != 0:
    ok = False
    break

if ok:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

from collections import Counter
S = list(input())

C = Counter(S)

ok = True
for s,x in C.items():
  if x % 2 != 0:
    ok = False
    break

if ok:
  print("Yes")
else:
  print("No")
N, W = map(int, input().split())
w, v = [0] * N, [0] * N
for i in range(N):
	w[i], v[i] = map(int, input().split())

dp = [[0] * (W + 1) for _ in range(N + 1)]
# dp[i][j](j=0,1,...,W)の値が求まっている状態で、dp[i+1][j]を更新することを考える

for i in range(N):
    for j in range(W+1):#重さ0からWまでチェック
        if j-w[i]>=0:#入れてもOKな場合,容量と価値を足す
            dp[i+1][j]=max(dp[i][j],dp[i][j-w[i]]+v[i])
        else:#何も入れずに先に進む
            dp[i+1][j]=dp[i][j]
print(max(set(dp[N])))


### FIXED CODE ###

N=int(input())
h=list(map(int, input().split()))
dp=[0]*N
for i in range(N):
  if i==0:
    dp[i]=0
  elif i==1:
    dp[i]=abs(h[i]-h[i-1])
  else:
    dp[i]=min(dp[i-1]+abs(h[i]-h[i-1]),dp[i-2]+abs(h[i]-h[i-2]))
print(dp[-1])
N = int(input())
S= input()
sub = 0
R,G,B = [],[],[]
r = S.count('R')
g = S.count('G')
b = S.count('B') 
for i in range(N):
    for j in range(i+1,N+1):
        if S[i] != S[j] and S[2*j-i] != S[i] and S[2*j-i] != S[j]:
            sub += 1
ans = r*g*b -sub
print(ans)
       

### FIXED CODE ###

N = int(input())
S= input()
sub = 0
R,G,B = [],[],[]
r = S.count('R')
g = S.count('G')
b = S.count('B') 
for i in range(N):
    for j in range(i+1,N):
        if 2*j-i > N-1:
            break
        if S[i] != S[j] and S[2*j-i] != S[i] and S[2*j-i] != S[j]:
            sub += 1
ans = r*g*b -sub
print(ans)
N=int(input())
N+=2
ans=N//3
ans-=
print(ans)


### FIXED CODE ###

n=int(input())
print(n//3)
x = int(input())
if x >= 30:
    print("Yes")
    else:
        print("No")

### FIXED CODE ###

x = int(input())
if x >= 30:
    print("Yes")
else:
    print("No")
n=int(input())

import numpy as np

def seachPrimeNum(N):
    max = int(np.sqrt(N))
    seachList = [i for i in range(2,N+1)]
    primeNum = []
    while seachList[0] <= max:
        primeNum.append(seachList[0])
        tmp = seachList[0]
        seachList = [i for i in seachList if i % tmp != 0]
    primeNum.extend(seachList)
    return primeNum

f=len(seachPrimeNum(n))
g=seachPrimeNum(n)
c=1

for j in range(f):
  e=g[j]
  a=0
  b=n
  h=0
  while b>=e:
    b=b//e
    h=h+b
    a=a+1
  c=c*(h+1)
print(c%(10**9+7))

### FIXED CODE ###

n=int(input())
if n==1:
  print("1")
else:
  import numpy as np
  
  def seachPrimeNum(N):
      max = int(np.sqrt(N))
      seachList = [i for i in range(2,N+1)]
      primeNum = []
      while seachList[0] <= max:
          primeNum.append(seachList[0])
          tmp = seachList[0]
          seachList = [i for i in seachList if i % tmp != 0]
      primeNum.extend(seachList)
      return primeNum
    
  f=len(seachPrimeNum(n))
  g=seachPrimeNum(n)
  c=1
  
  for j in range(f):
    e=g[j]
    a=0
    b=n
    h=0
    while b>=e:
      b=b//e
      h=h+b
      a=a+1
    c=c*(h+1)
  print(c%(10**9+7))
# -*- coding: utf-8 -*-

from scipy.misc import comb
import sys
sys.setrecursionlimit(1000000000)


class UnionFind:

    def __init__(self, n):
        # parent[x] < 0 means x is root and abs(parent[x]) == size[x]
        self.parent, self.depth = [-1] * (n + 1), [0] * (n + 1)

    def find(self, x):
        if self.parent[x] < 0:
            return x
        else:
            self.parent[x] = self.find(self.parent[x])
            return self.parent[x]

    def isSame(self, x, y):
        return self.find(x) == self.find(y)

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

        if self.depth[x] > self.depth[y]:
            self.parent[x] += self.parent[y]
            self.parent[y] = x
        else:
            self.parent[y] += self.parent[x]
            self.parent[x] = y
            if self.depth[x] == self.depth[y]:
                self.depth[y] += 1

    def count(self, x):
        return - self.parent[self.find(x)]


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

AB = [tuple(map(int, input().split())) for _ in range(M)]
AB.reverse()

groups = UnionFind(N)
ans = [comb(N, 2, exact=True)]
for i in range(M):
    if groups.isSame(AB[i][0], AB[i][1]):
        ans.append(ans)
    else:
        ans.append(ans[-1] - groups.count(AB[i][0]) * groups.count(AB[i][1]))
        groups.unite(AB[i][0], AB[i][1])

for i in range(M):
    print(ans[-(i + 2)])


### FIXED CODE ###

# -*- coding: utf-8 -*-

from scipy.misc import comb
import sys
sys.setrecursionlimit(1000000000)


class UnionFind:

    def __init__(self, n):
        self.parent = [i for i in range(n + 1)]
        self.depth = [1] * (n + 1)
        self.count = [1] * (n + 1)

    def find(self, x):
        if self.parent[x] == x:
            if self.depth[x] > 2:
                self.depth[x] = 2
            return x
        else:
            self.parent[x] = self.find(self.parent[x])
            self.depth[x], self.count[x] = 0, 0
            return self.parent[x]

    def isSame(self, x, y):
        return self.find(x) == self.find(y)

    def union(self, x, y):
        x, y = self.find(x), self.find(y)

        if self.depth[x] < self.depth[y]:
            self.parent[x] = self.parent[y]
            self.count[y] += self.count[x]
            self.depth[x], self.count[x] = 0, 0
        else:
            self.parent[y] = self.parent[x]
            self.count[x] += self.count[y]
            self.depth[y], self.count[y] = 0, 0
            if self.depth[x] == self.depth[y]:
                self.depth[x] += 1


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

A, B = [], []
for _ in range(M):
    a, b = map(int, input().split())
    A.append(a)
    B.append(b)

A.reverse()
B.reverse()

groups = UnionFind(N)
ans = [comb(N, 2, exact=True)]
for i in range(M):
    tmp = ans[-1]
    if not groups.isSame(A[i], B[i]):
        nA, nB = groups.count[groups.find(
            A[i])], groups.count[groups.find(B[i])]
        tmp -= nA * nB
        groups.union(A[i], B[i])
    ans.append(tmp)

for i in range(M):
    print(ans[-(i + 2)])
import sys
input = sys.stdin.readline

def main():
    n,k = map(int, input().split())
    A = map(int, input().split())
    A = sorted(A, key=lambda x: abs(x), reverse=True)

    ans = 1

    minK, maxK = None, None
    for a in A[:k]:
        ans *= a
        if minK is None or a < minK:
            minK = a
        if maxK is None or a > maxK:
            maxK = a

    if ans >= 0:
        print(ans % (10**9+7))
    else:
        minK_1, maxK_1 = None, None
        for a in A[k:]:
            if minK_1 is None or a < minK_1:
                minK_1 = a
            if maxK_1 is None or a > maxK_1:
                maxK_1 = a

        tmpMax = max(ans//minK * maxK_1, ans//maxK * minK_1)
        if tmpMax > ans:
            ans = tmpMax

        print(ans % (10**9+7))
main()

### FIXED CODE ###

import sys
input = sys.stdin.readline

def main():
    n,k = map(int, input().split())
    A = sorted(map(int, input().split()))
    mod = 10**9 + 7
    ans, sign = 1, 1

    l, r = 0, n-1

    if k%2:
        ans = A[r]
        r-=1
        k-=1
        if ans < 0:
            sign = -1
    while k:
        x = A[l]*A[l+1]
        y = A[r]*A[r-1]

        if x*sign > y*sign:
            ans = x%mod * ans%mod
            l+=2
        else:
            ans = y%mod * ans%mod
            r-=2
        k-=2
    print((ans+mod)%mod)
main()
inlist = input().split()
print(inlist[0] * inlist[1])

### FIXED CODE ###

inlist = input().split()
print(int(inlist[0]) * int(inlist[1]))
import sys

sentence = sys.stdin.read().lower()
alf=[chr(i) for i in range(ord('a'), ord('z'))]

ans=zip(alf, [0]*26)

for a in sentence:
  if a in alf:
    alf[a] += 1

for key, val in enumerate(alf):
  print(key + " : " + val)

### FIXED CODE ###

import sys

sentence = sys.stdin.read().lower()
alf=[chr(i) for i in range(ord('a'), ord('z')+1)]

ans=dict(zip(alf, [0]*26))

for a in sentence:
  if a in ans:
    ans[a] += 1

for (key, val) in sorted(ans.items()):
  print(key ,":" , val)
n, k = map(int, input().split())
h = [int(input()) for _ in range(N)]

h.sort()
m = sum(h)

for i in range(n - k):
    m = min(h[i + k] - h[i], m)
print(m)


### FIXED CODE ###

n, k = map(int, input().split())
h = [int(input()) for _ in range(n)]

h.sort()
m = sum(h)

for i in range(n - k + 1):
    m = min(h[i + k - 1] - h[i], m)
print(m)
# coding: utf-8
# Here your code !
a,b,c = input().split()
if(a <= b <= c):
    print('%d %d %d'%(a,b,c))
if(a >= b >= c):
    print('%d %d %d'%(c,b,a))
if(a > c > b):
    print('%d %d %d'%(a,c,b))
if(b > a >= c):
    print('%d %d %d'%(b,a,c))
if(b > c > a):
    print('%d %d %d'%(b,c,a))
if(c > b >= a):
    print('%d %d %d'%(c,b,a))
if(c > a > b):
    print('%d %d %d'%(c,a,b))

### FIXED CODE ###

# coding: utf-8
# Here your code !

line = input().strip().split(" ")

if int(line[0]) <= int(line[1]):
    if int(line[1]) <= int(line[2]):
        print(line[0] + " " + line[1] + " " + line[2])
    elif int(line[2]) < int(line[1]):
        if int(line[0]) <= int(line[2]):
            print(line[0] + " " + line[2] + " " + line[1])
        else:
            print(line[2] + " " + line[0] + " " + line[1])

elif int(line[1]) < int(line[0]):
    if int(line[0]) <= int(line[2]):
        print(line[1] + " " + line[0] + " " + line[2])
    else:
        if int(line[2]) <= int(line[1]):
            print(line[2] + " " + line[1] + " " + line[0])
        else:
            print(line[1] + " " + line[2] + " " + line[0])
print(int(input())*int(input())*int(input()))



### FIXED CODE ###

n = int(input())
print(n*n*n)