Harryxun/stf_run huggingface dataset:
N, K = map(int, input().split())
A = list(map(int, input().split()))
MOD = 10**9 + 7

# case1. N == K のときは答えは確定
if N == K:
    ans = 1
    for i in range(K):
        ans *= A[i]
        ans %= MOD
    print(ans)
# case2. A が全部負の数のとき、 Kが奇数ならば残念ながら答えは負になるのでなるべく絶対値を小さくする
elif max(A) < 0 and K%2 == 1:
    ans = 1
    A = sorted(A, reverse=True)
    for i in range(K):
        ans *= A[i]
        ans %= MOD
    print(ans)
else:
    # case3. それ以外は正にできるので、絶対値の降順にソートする
    A_ = sorted(A, key=lambda x: abs(x), reverse=True)
    # とりあえず大きい順に K-1 個掛けてみる
    ans = 1
    for i in range(K-1):
        ans *= A[i]
    if ans >= 0:
        ans %= MOD
        print(ans)
    else:
        # 取り除く対象を old, 取り込む対象を new とする
        # case3-1. 負数を取り除いて非負数を取り込む
        # まずは new を探す
        j = K
        while j < N or A[j] < 0:
            j += 1
        if j < N:
            new1 = A[j]
        # old を探す
        l = K-1
        while A[l] >= 0:
            l -= 1
        old1 = A[l]
        if new1 and old1:
            cand1 = ans * pow(old1, MOD-2, MOD) * new1
        # case3-2. 非負数を取り除いて負数を取り込む
        # まずは new を探す
        j = K
        while j < N or A[j] >= 0:
            j += 1
        if j < N:
            new2 = A[j]
        # old を探す
        l = K-1
        while A[l] < 0:
            l -= 1
        old2 = A[l]
        if new2 and old2:
            cand2 = ans * pow(old2, MOD-2, MOD) * new2

        if cand1 and cand2:
            ans = max(cand1, cand2) % MOD
        elif cand1:
            ans = cand1 % MOD
        else:
            ans = cand2 % MOD
        print(ans)


### FIXED CODE ###

from heapq import heappush, heappop


N, K = map(int, input().split())
A = list(map(int, input().split()))
A = sorted(A, reverse=True)

MOD = 10**9 + 7

# case1. N == K のときは答えは確定
if N == K:
    ans = 1
    for i in range(K):
        ans *= A[i]
        ans %= MOD
    print(ans)
# case2. A が全部負の数のとき、 Kが奇数ならば残念ながら答えは負になるのでなるべく絶対値を小さくする
elif max(A) < 0 and K % 2 == 1:
    ans = 1
    for i in range(K):
        ans *= A[i]
        ans %= MOD
    print(ans)
else:
    # case3. それ以外は正にできる

    # K が奇数のとき、非負要素から1つ取って偶数の場合に帰着
    # K が偶数のとき、面倒なので 2 つセットで考えて K//2 個取る問題に帰着

    if K%2 == 1:
        ans = A.pop(0)  # あらかじめ最大値を確保
        n = (K-1)//2
    else:
        ans = 1
        n = K//2

    # 絶対値の降順にソートする
    A = sorted(A, key=lambda x: abs(x), reverse=True)

    # 候補テーブルを作成
    cand = []  # 非負要素、負要素をそれぞれ絶対値の大きい順に 2 つずつ掛けたもの

    BIGINT = 10**9 + 1  # tmp 用
    tmp1 = BIGINT
    tmp2 = BIGINT

    for a in A:
        if a >= 0:
            if tmp1 == BIGINT:
                tmp1 = a
            else:
                heappush(cand, -tmp1*a)
                tmp1 = BIGINT
        else:
            if tmp2 == BIGINT:
                tmp2 = a
            else:
                heappush(cand, -tmp2*a)
                tmp2 = BIGINT

    # あとは大きい方から n 個取る
    for i in range(n):
        ans *= -heappop(cand)
        ans %= MOD
    print(ans)
N = int(input())
A = list(map(int,input().split()))
if N == 1:
    print(1)
    exit()
d = [A[i+1] - A[i] for i in range(N-1)]
def judge(list_hoge = d,count = 1):
    for i in range(1,len(list_hoge)):
        if list_hoge[i] * list_hoge[0] < 0:
            return judge(list_hoge[i+1:],count + 1)
    print(count)
judge()


### FIXED CODE ###

N = int(input())
A = list(map(int,input().split()))
state = 0
count = 1
for i in range(1,N):
    note = state
    d = A[i] - A[i-1]
    if d > 0:
        state = 1
    elif d == 0:
        pass
    elif d < 0:
        state = -1
    if (state,note) == (1,-1) or (state,note) == (-1,1):
        count += 1
        state = 0
print(count)
n, k = map(int, input().split())
V = list(map(int, input().split()))
ans = 0
for L in range(k+1):
    for R in range(k-L+1):
        val = 0
        neg = []
        for i in range(L):
            val += V[i]
            if V[i] < 0:
                neg.append(V[i])
        for i in range(n-1, n-1-R, -1):
            val += V[i]
            if V[i] < 0:
                neg.append(V[i])
        neg.sort()
        val -= sum(neg[:k-L-R])
        if ans < val:
            ans = val
print(ans)


### FIXED CODE ###

n, k = map(int, input().split())
V = list(map(int, input().split()))
ans = 0
for L in range(k+1):
    for R in range(k-L+1):
        if n < L+R:
            break
        val = 0
        neg = []
        for i in range(L):
            val += V[i]
            if V[i] < 0:
                neg.append(V[i])
        for i in range(n-1, n-1-R, -1):
            val += V[i]
            if V[i] < 0:
                neg.append(V[i])
        neg.sort()
        val -= sum(neg[:k-L-R])
        if ans < val:
            ans = val
print(ans)
a, b = map(int(), input().split())
if (a * b) % 2 == 0:
  print ("Evern")
else:
  print ("Odd")

### FIXED CODE ###

a,b = map(int, input().split())
if (a * b) % 2 == 0:
  print("Even")
else:
  print("Odd")
n,m = map(int,input().split())
abl = []
for _ in range(n):
    a,b = map(int,input().split())
    abl.append((a,b))

cdl = []
for _ in range(n):
    c,d = map(int,input().split())
    cdl.append((c,d))

for a,b in abl:
    ans = float("inf")
    log = -1
    for idx, (c,d) in enumerate(cdl):
        tmp = abs(a-c) + abs(b-d)
        if ans > tmp:
            ans = tmp
            log = idx+1
    print(log)








### FIXED CODE ###

n,m = map(int,input().split())
cdl = []
for _ in range(n):
    a,b = map(int,input().split())
    cdl.append((a,b))
abl = []
for _ in range(m):
    c,d = map(int,input().split())
    abl.append((c,d))

for c,d in cdl:
    ans = -1
    l = float("inf")
    for idx, (a,b) in enumerate(abl):
        dist = abs(a-c) + abs(b-d)
        if dist < l:
            ans = idx + 1
            l = dist
    print(ans)
def ff(x,y,z):
    return(x**2+y**2+z**2+x*y+y*z+z*x)
 
n=int(input())
an = []
for i in range(1,50):
    for j in range(1,50):
        for k in range(1,50):
            wk=ff(i,j,k)
            if wk<n:
                an.append(wk)
            else:
                break
ann=set(an)
annn=sorted(ann)
wk =0
for i in range(1,n+1):
    if i ==annn[wk]:
        print(3)
        if wk+1>=len(annn):
            pass
        else:
            wk+=1
    else:
        print(0)

### FIXED CODE ###

def ff(x,y,z):
    return(x**2+y**2+z**2+x*y+y*z+z*x)

n=int(input())
an=[0]*n
for i in range(1,100):
    for j in range(1,100):
        for k in range(1,100):
            wk=ff(i,j,k)
            if wk<=n:
                an[wk-1]+=1
for i in an:
    print(i)
for _ in [0]*int(input()):
    s=input()
    if s[1]=='\'':
        a=s[2:-1].split('#')
        print(['NA','A'][set(a[0])==set(a[1])=={'='} and len(set(a))==1])
    else:
        s=s[2:-2]
        print(['NA','B'][len(s)==2*s.count('Q=')])

### FIXED CODE ###

for _ in [0]*int(input()):
    s=input()
    a='NA'
    if s[:2]==">'" and s[-1]=='~' and '#' in s:
        s=s[2:-1].split('#')
        a=[a,'A'][set(s[0])==set(s[1])=={'='} and len(set(s))==1]
    elif s[:2]=='>^' and s[-2:]=='~~':
        s=s[2:-2]
        a=['NA','B'][len(s)==2*s.count('Q=') and len(s)>0]
    print(a)
import numpy

L = int(input())
print(numpy.sum([math.gcd(math.gcd(i + 1, j + 1), k + 1) for i in range(L) for j in range(L) for k in range(L)]))

### FIXED CODE ###

import numpy
import math

L = int(input())
ans = 0
for i in range(L):
    for j in range(L):
        t = math.gcd(i+1, j+1)
        for k in range(L):
            ans += math.gcd(t, k + 1)
print(ans)
a=input()
b=input()
print(b + a)

### FIXED CODE ###

line=input().split(' ')
print(line[1] + line[0])
a, b = map(int, input()split())
x = a * a
print(x - b)

### FIXED CODE ###

a = int(input())
b = int(input())
print(a * a - b)
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools
 
sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7
 
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
 
def main():
    n = I()
    a = sorted([sorted(LI()) + [_] for _ in range(n)])
    b = sorted(a, key=lambda x: x[1])
    r = (a[-1][0]-a[0][0]) * (b[-1][1]-b[0][1])
 
 
    bm = b[-1][1] - a[0][0]
    bmi = b[0][2]
    am = a[-1][1]
    at = 0
    k = [[inf,0]]
    for i in range(n-1):
        kk = []
        kk.append(min(k[-1][0], b[i][0], b[i+1][1]))
        kk.append(max(k[-1][1], b[i][0]))
        if kk[0] == k[-1][0]:
            k[-1][1] = kk[1]
        else:
            k.append(kk)
 
    k = k[1:]
    kl = len(k)
 
    am = b[-1][1] - a[0][0]
    ami = a[0][2]
    bm = 0
    mtm = 0
    bt = b[0][1]
 
    for i in range(n-1,0,-1):
        tm = b[i][0]
        if mtm < tm:
            mtm = tm
        if ami == b[i][2]:
            break
        if tm < bt:
            bt = tm
        if tm < b[i-1][1]:
            tm = b[i-1][1]
        bm = mtm
        if tm > bm:
            bm = tm
 
        tr = am * (bm-bt)
        if r > tr:
            r = tr
 
        for j in range(kl):
            ki,km = k[j]
            if km > bm:
                break
            tr = am * (bm-min(ki,bt))
            if r > tr:
                r = tr
 
    return r
 
 
print(main())

### FIXED CODE ###

import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()


def main():
    n,t = LI()
    a = LI()
    s = 0
    c = 0
    r = 0
    for b in a:
        if c < b:
            r += c - s
            s = b
            c = b+t
        else:
            c = b+t
    r += c-s

    return r


print(main())
#!usr/bin/env python3


import sys


def I(): return int(sys.stdin.readline())


def solve():
    n = I()
    sli = [input() for i in range(n)]
    setli = set(sli)
    rank = {}
    for i in setli:
        j = sli.count(i)
        rank[i] = j
    for i in sorted([k for k, v in rank.items() if v == max(rank.values())]):
        print(i)


# Solve
if __name__ == "__main__":
    solve()


### FIXED CODE ###

#!usr/bin/env python3
from collections import defaultdict, deque
from heapq import heappush, heappop
from itertools import permutations
import sys
import math
import bisect


def LI(): return [int(x) for x in sys.stdin.readline().split()]


def I(): return int(sys.stdin.readline())


def LS(): return [list(x) for x in sys.stdin.readline().split()]


def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res


def IR(n):
    return [I() for i in range(n)]


def LIR(n):
    return [LI() for i in range(n)]


def SR(n):
    return [S() for i in range(n)]


def LSR(n):
    return [LS() for i in range(n)]


sys.setrecursionlimit(1000000)
mod = 1000000007


def solve():
    a, b, c = LI()
    if a == b == c:
        print('No')
    elif a == b:
        print('Yes')
    elif a == c:
        print('Yes')
    elif b == c:
        print('Yes')
    else:
        print('No')


# Solve
if __name__ == "__main__":
    solve()
S=input()
T=input()

ans=0

for in in range(3):
    if S[i]==T[i]:
        ans+=1

print(ans)

### FIXED CODE ###

S=input()
T=input()

ans=0

for i in range(3):
    if S[i]==T[i]:
        ans+=1

print(ans)
x = list(map(int,input().split()))
A_list[1,3,5,7,8,10,12]
B_list[4,6,9,11]
C_list[2]
if i[0] in A_list and i[1] in A_list:
  print("Yes")
if i[0] in B_list and i[1] in B_list:
  print("Yes")
if i[0] in C_list and i[1] in C_list:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

i = list(map(int, input().split()))
 
A_list = [1, 3, 5, 7, 8, 10, 12]
B_list = [4, 6, 9, 11]
C_list = [2]
 
if i[0] in A_list and i[1] in A_list:
    print("Yes")
elif i[0] in B_list and i[1] in B_list:
    print("Yes")
elif i[0] in C_list and i[1] in C_list:
    print("Yes")
else:
    print("No")
N, T = map(int, input().split())
c_t = [list(map(int, input().split())) for _ in range(N)]
cost = 2_000_000
TLE_flg = True
for i in range(N):
    if c_t[i][1] <= T:
        cost = min(cost, c_t[i][0])
        TLE_flg = False
print('TLE' if TLE_flg else cost)


### FIXED CODE ###

N, T = map(int, input().split())
c_t = [list(map(int, input().split())) for _ in range(N)]
cost = 2000000
TLE_flg = True
for i in range(N):
    if c_t[i][1] <= T:
        cost = min(cost, c_t[i][0])
        TLE_flg = False
print('TLE' if TLE_flg else cost)
D = int(input())

if D = 25:
  print(Chrismas)
elif D = 24:
  print(Chrismas Eve)
elif D = 23:
  print(Chrismas Eve Eve)
elif D = 22:
  print(Chrismas Eve Eve Eve)

### FIXED CODE ###

D = int(input())
 
if D == 25:
  print("Christmas")
elif D == 24:
  print("Christmas Eve")
elif D == 23:
  print("Christmas Eve Eve")
elif D == 22:
  print("Christmas Eve Eve Eve")
X, N = map(int, input().split())
num = list(map(int, input().split()))

if N == 0:
    print(X)
else:
    num_list = [i for i in range(-100, 101) if i != 0]

    for i in range(X-1,-1,-1):
        if i in num:
            continue
        else:
            index1 = i
            break
            
    for i in range(X+1, 101):
        if i in num:
            continue
        else:
            index2 = i
            break
            
    if abs(X - index1) > abs(X - index2):
        print(index2)
    else:
        print(index1)

### FIXED CODE ###

X, N = map(int, input().split())
nums = list(map(int, input().split()))

if N == 0:
    print(X)
    exit()
else:
    for i in range(200):

        if X-i not in nums:
            print(X-i)
            exit()

        if X+i not in nums:
            print(X+i)
            exit()
X, Y = map(int, input().split()) ans = 'No'
for a in range(X + 1):
b=X-a
if 2 * a + 4 * b == Y:
ans = 'Yes' print(ans)
  


### FIXED CODE ###

X, Y = map(int, input().split()) 
ans = 'No'
for a in range(X + 1):
	b=X-a
	if 2 * a + 4 * b == Y:
		ans = 'Yes' 
print(ans)
b = input()
if b == "A":
    print("T")

elif b =="T":
    print("A")

elif b =="C":
    print("G")

elif b == "G":
    pritn("C")

### FIXED CODE ###

b = input()
if b == "A":
    print("T")

elif b =="T":
    print("A")

elif b =="C":
    print("G")

elif b == "G":
    print("C")
# ABC141D - Powerful Discount Tickets
from heapq import heapify, heappop, heappush


def main():
    N, M, *A = map(int, open(0).read().split())
    H = [-i for i in A]
    heapify(H)
    pop_max, push_max = lambda: -heappop(H), lambda x: heappush(-x)
    for _ in range(M):
        x = pop_max()
        push_max(x // 2)
    ans = -sum(H)
    print(ans)


if __name__ == "__main__":
    main()

### FIXED CODE ###

# ABC141D - Powerful Discount Tickets
from heapq import heapify, heappop, heappush


def main():
    N, M, *A = map(int, open(0).read().split())
    B = [-i for i in A]
    heapify(B)
    for _ in range(M):
        x = -heappop(B) >> 1
        heappush(B, -x)
    ans = -sum(B)
    print(ans)


if __name__ == "__main__":
    main()
s＝str(input())
t = str(input())
if(len(t)==len(s)+1):
  print("Yes")
else:
  print("No")

### FIXED CODE ###

s=str(input())
t = str(input())
if(s==t[0:len(s)]):
  if(len(s)+1==len(t)):
    print("Yes")
  else:
    print("No")
else:
  print("No")
a1 = list(map(int, input().split()))
a2 = list(map(int, input().split()))
a3 = list(map(int, input().split()))

al = a1+a2+a3
n =int(input())

for i in range(n):
    b = int(input())
    if b in al:
        al[al.index()] = 0
if a1[0] + a1[1] + a1[2] == 0 or a2[0] + a2[1] + a2[2] == 0 or a3[0] + a3[1] + a3[2] == 0 or a1[0] + a2[0] + a3[0] == 0 or a1[1] + a2[1] + a3[1] == 0 or a1[2] + a2[2] + a3[2] == 0 or a1[0] + a2[1] + a3[2] == 0 or a1[2] + a2[1] + a3[0] == 0:
    print("Yes")
else:
    print("No")


### FIXED CODE ###

a1 = list(map(int, input().split()))
a2 = list(map(int, input().split()))
a3 = list(map(int, input().split()))

al = a1+a2+a3
n =int(input())

for i in range(n):
    b = int(input())
    if b in al:
        al[al.index(b)] = 0
if al[0] + al[1] + al[2] == 0 or al[3] + al[4] + al[5] == 0 or al[6] + al[7] + al[8] == 0 or al[0] + al[3] + al[6] == 0 or al[1] + al[4] + al[7] == 0 or al[2] + al[5] + al[8] == 0 or al[0] + al[4] + al[8] == 0 or al[2] + al[4] + al[6] == 0:
    print("Yes")
else:
    print("No")
w,h,x,y=map(int,input().split())

if w==x:
    print('{:6f}'.format(min(w*(h-y),w*y)),0)
elif h==x:
    print('{:6f}'.format(min((w-x)*h,x*h)),0)
elif (w-x)*h==w*(h-y):
    print('{:6f}'.format((w-x)*h,1)
elif min((w-x)*h,x*h)>min(w*(h-y),w*y):
    print('{:6f}'.format(min((w-x)*h,x*h)),0)
else:
    print('{:6f}'.format(min(w*(h-y),w*y)),0)

### FIXED CODE ###

w,h,x,y=map(int,input().split())
print(w*h/2)
if x==w/2 and y==h/2:
    print(1)
else:
    print(0)
R = int(input())
if R < 1200:
    print("ABC")
elif 1200 <= R < 2800:
    print("ARC")
else print("AGC")

### FIXED CODE ###

R = int(input())
if R < 1200:
    print("ABC")
elif 1200 <= R < 2800:
    print("ARC")
else :
    print("AGC")
N = int(input())
A = list()
B = list()
for i in range(N):
  a, b = map(int, input().split())
  A.append(a)
  B.append(b)
  
A.sort()
B.sort()

if(N%2==1):
  x = A[(N-1)//2]
  y = B[(N-1)//2]
  print(y-x+1)
else:
  x = A[(N//2)+1] + A[N//2]
  y = B[(N//2)+1] + B[N//2]
  print(y-x+1)

### FIXED CODE ###

N = int(input())
A = list()
B = list()
for i in range(N):
  a, b = map(int, input().split())
  A.append(a)
  B.append(b)
  
A.sort()
B.sort()

if(N%2==1):
  x = A[(N-1)//2]
  y = B[(N-1)//2]
  print(y-x+1)
else:
  x = A[(N//2)-1] + A[N//2]
  y = B[(N//2)-1] + B[N//2]
  print(y-x+1)
def read_line(*types): return [f(a) for a, f in zip(input().split(), types)]

n, q = read_line(int, int)
s, = read_line(str)

p = []
for i in range(len(s) - 1):
    if s[i:i+2] == 'AC':
        p.append(i)

for i in range(q):
    l, r = read_line(int, int)
    l, r = l - 1, r

    c = 0
    print(s[l:r])
    for pp in p:
        if l <= pp and pp + 1 < r:
            c += 1
    print(c)


### FIXED CODE ###

def read_line(*types): return [f(a) for a, f in zip(input().split(), types)]

n, q = read_line(int, int)
s, = read_line(str)

m = [0 for _ in range(len(s) + 1)]

c = 0
for i in range(len(s)):
    if s[i:i+2] == 'AC':
        c += 1
    m[i + 1] = c

for i in range(q):
    l, r = read_line(int, int)

    if c == 0:
        print(0)
        continue
    print(m[r - 1] - m[l - 1])
W, H, x, y = map(int, input().split())

divide_x = (x * H, (W-x) * H)
divide_y = (W * y, W * (H-y))
max_value = max(min(divide_x), min(divide_y))
if min(divide_x) == min(divide_y):
    is_mullt_ans = 1
else:
     is_mullt_ans = 0

print(max_value, is_mult_ans)

### FIXED CODE ###

W, H, x, y = map(int, input().split())

if W % 2 == 0 and H % 2 == 0 and x == W // 2 and y == H // 2:
    is_mullt_ans = 1
else:
    is_mullt_ans = 0

print(W * H / 2, is_mullt_ans)
import heapq

N = int(input())
A = list(map(int,input().split(' ')))
A_min = heapq.nsmallest(2,A)
X= A_min[0]
Y = A_min[1]

while X > 0 and Y > 0:
  if X <= Y:
    Y -= X
  else:
    X -= Y
print(max(X,Y))


### FIXED CODE ###

A, B = map(int, input().split(' '))

if B % A == 0:
  print(B+A)
else:
  print(B-A)
import sys
input = sys.stdin.readline
import numpy as np

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

dp = np.zeros([N + 1,W + 1],dtype=int)

print(dp)

for i in range(N):
  weight, value = map(int, input().split())
  dp[i + 1] = dp[i]
  dp[i + 1, weight:] = np.maximum(dp[i + 1,weight:], dp[i,:W - weight + 1] + value)

print(dp[N][W])

### FIXED CODE ###

import numpy as np

N , W = map(int,input().split())
dp = np.full(N * 1000 + 1,W + 1)
dp[0] = 0

for i in range(N):
  w,v = map(int,input().split())
  dp[v:] = np.minimum(dp[v:],dp[:-v] + w)

print(np.max(np.where(dp <= W)))
import math
N,K = map(int,input().split())
mod = 1000000007

for j in range(K):
    i = j+1
    x = math.factorial(K-1)//(math.factorial(K-i)*math.factorial(i-1))
    y = math.factorial(N-K+1)//(math.factorial(N-K+1-i)*math.factorial(i))
    ans = x*y
    ans = int(ans%mod)
    print(ans)
    

### FIXED CODE ###

import math
N,K = map(int,input().split())
mod = 1000000007

for j in range(K):
    i = j+1
    p = N-K+1-i
    if p <0:
        p = 0
    x = math.factorial(K-1)//(math.factorial(K-i)*math.factorial(i-1))
    y = math.factorial(N-K+1)//(math.factorial(p)*math.factorial(i))
    ans = x*y
    ans = int(ans%mod)
    print(ans)
import numpy as np

def main():
    n = int(input())
    ball = [list(map(int, input().split(' '))) for i in range(n)]
    ball = np.array(ball, dtype=int)
    # print(ball)

    l1 = []
    l2 = []
    for i in range(n):
        for j in range(i, n):
            if i == j: continue
            dis1 = ball[i] - ball[j]
            dis2 = ball[j] - ball[i]
            l1.append(list(dis1))
            l2.append(list(dis2))
    # print(l1, l2)
    # c1 = collections.Counter(l1)
    # c2 = collections.Counter(l2)

    c1 = []
    c2 = []
    for i in range(len(l1)):
        c1.append(l1.count(l1[i]))
        c2.append(l2.count(l2[i]))
    m1 = np.max(np.array(c1, dtype=int))
    m2 = np.max(np.array(c2, dtype=int))

    print(max(1,max(m1,m2)))

if __name__ == "__main__":
    main()

### FIXED CODE ###

import numpy as np

def main():
    n = int(input())
    ball = [list(map(int, input().split(' '))) for i in range(n)]
    ball = np.array(ball, dtype=int)
    if n == 1:
        print(1)
        exit()

    l1 = []
    for i in range(len(ball)):
        for j in range(len(ball)):
            if i == j: continue
            dis1 = ball[i] - ball[j]
            l1.append(list(dis1))

    c1 = []
    for i in range(len(l1)):
        c1.append(l1.count(l1[i]))
    m1 = np.max(np.array(c1, dtype=int))

    print(n-m1)

if __name__ == "__main__":
    main()
N = int(input())
word = input()
word_list=[]
word_num = int(input())

for i in range(len(word)):
    word_list.append(word[i])
    if str(word[i]) != str(word[word_num -1]):
         word_list[i] = '*'

print(" ".join(list(map(str,word_list))))

### FIXED CODE ###

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

if ((N[0] > N[2]) and (N[1] < N[2])) or ((N[0] < N[2]) and (N[1] > N[2])):
    print("Yes")
else:
    print("No")
import numpy as np

x = input()
print(x**3)
print("\n")

### FIXED CODE ###

N = input()

print(N**3)
def main():
    from heapq import heappush, heappop
    input = sys.stdin.readline
    H, W = map(int, input().split())
    D = [None]*H
    Q = []
    for h in range(H):
        D[h] = [10e10]*W
        l = input().strip()
        for w in range(W):
            if l[w] == "#":
                D[h][w] = 0
                Q.append((0, h, w))

    m = 0
    while Q:
        d, h, w = heappop(Q)
        alt = d+1
        m = max(m, d)
        for dx, dy in [(-1,0), (1,0), (0,-1), (0, +1)]:
            h1, w1 = h+dx, w+dy
            if 0 <= h1 < H and 0 <= w1 < W:
                if D[h1][w1] > alt:
                    D[h1][w1] = alt
                    heappush(Q, (alt, h1, w1))

    #for h in range(H): print(D[h])
    print(m)

main()




### FIXED CODE ###

def gen():
    print("1000 1000")
    print("#"+"."*999)
    for i in range(1000-1):
        print("."*1000)

def main():
    from collections import deque
    import sys
    from heapq import heappush, heappop
    input = sys.stdin.readline
    H, W = map(int, input().split())
    D = [None]*H
    Q = deque()
    for h in range(H):
        D[h] = [10e10]*W
        l = input()
        for w in range(W):
            if l[w] == "#":
                D[h][w] = 0
                Q.append((h, w))
    m = 0
    while Q:
        h, w = Q.popleft()
        alt = D[h][w] + 1
        for dx, dy in [(-1,0), (1,0), (0,-1), (0, +1)]:
            h1, w1 = h+dx, w+dy
            if 0 <= h1 < H and 0 <= w1 < W:
                if D[h1][w1] > alt:
                    D[h1][w1] = alt
                    m = max(m, alt)
                    Q.append((h1, w1))

    print(m)
main()