Harryxun/stf_run huggingface dataset:
xx, y = map(str, input().split())
if int(x, 16) < int(y, 16):
    print('<')
elif int(x, 16) == int(y, 16):
    print('=')
else:
    print('>')

### FIXED CODE ###

x, y = map(str, input().split())
if int(x, 16) < int(y, 16):
    print('<')
elif int(x, 16) == int(y, 16):
    print('=')
else:
    print('>')
# -*- coding: utf-8 -*-

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

ns = list(range(A, B+1))
first =  ns[:K]
last  = ns[-K:]

for n in first + last:
  print(n)


### FIXED CODE ###

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

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

l,r = A+K-1,B-K+1

if l >= r:
  first = list(range(A, r))
else:
  first = list(range(A, l+1))
last  = list(filter(lambda n: n>=A, range(r, B+1)))

for n in (first + last):
  print(n)
a,b,c=map(int,input()split("/"))
print("Heisei" if b*10+c<=70 else "TBD")
  

### FIXED CODE ###

a,b,c=map(int,input().split("/"))
print("Heisei" if b*100+c<=430 else "TBD")
S = input()S = input()

if len(S) >= 6:
    if S[2]==S[3] and S[4]==S[5]:
        ret = 'Yes'
    else:
        ret = 'No'
else:
    ret = 'No'
print(ret)

### FIXED CODE ###

S = input()
 
if len(S) >= 6:
    if S[2]==S[3] and S[4]==S[5]:
        ret = 'Yes'
    else:
        ret = 'No'
else:
    ret = 'No'
print(ret)
'''input
1 2
. .
'''
# A coding delight
from sys import stdin, stdout
import gc
gc.disable()
input = stdin.readline
from collections import deque


def mp(arr):
	arr = map(str, arr)
	return ' '.join(arr)


def bfs(source):
	myq = deque()
	myq.append(source)
	visited = dict()
	visited[mp(source)] = True
	dist = 0
	while len(myq) > 0:
		temp = deque()
		while len(myq) > 0:
			x, y  = myq.popleft()
			if x - 1 >= 0 and maze[x - 1][y] != '#' and mp([x - 1, y]) not in visited:
				visited[mp([x -1, y])] = True
				temp.append([x - 1, y])
			if x  + 1 < n and maze[x + 1][y] != '#' and mp([x + 1, y]) not in visited:
				visited[mp([x + 1, y])] = True
				temp.append([x + 1, y])
			if y - 1 >= 0 and maze[x][y - 1] != '#' and mp([x, y - 1]) not in visited:
				visited[mp([x, y - 1])] = True
				temp.append([x, y - 1])
			if y + 1 < m and maze[x][y + 1] != '#' and mp([x, y + 1]) not in visited:
				visited[mp([x, y + 1])] = True
				temp.append([x, y + 1])
		dist += 1
		myq = temp
	return dist		


# main starts
n, m = list(map(int, input().split()))
maze = []
for _ in range(m):
	state = list(stdin.readline().strip())
	maze.append(state)

# from random import randint
# maze = []
# n = 20
# m = 20
# for i in range(20):
# 	temp = []
# 	for i in range(20):
# 		k = randint(1, 2)
# 		if k == 1:
# 			temp.append('.')
# 		else:
# 			temp.append('#')
# 	maze.append(temp)

ans = 0
done = set()
for i in range(n):
	for j in range(m):
		first = [i, j]
		ans = max(ans, bfs(first))
		
print(ans - 1)

### FIXED CODE ###

'''input
3 3
.#.
#..
.#.
'''
# A coding delight
from sys import stdin, stdout
import gc
gc.disable()
input = stdin.readline
from collections import deque


def mp(arr):
	arr = map(str, arr)
	return ' '.join(arr)


def bfs(source):
	myq = deque()
	myq.append(source)
	visited = dict()
	visited[mp(source)] = True
	dist = -1
	while len(myq) > 0:
		temp = deque()
		dist += 1
		while len(myq) > 0:
			x, y  = myq.popleft()
			if x - 1 >= 0:
				if maze[x - 1][y] != '#' and mp([x - 1, y]) not in visited:
					visited[mp([x -1, y])] = True
					temp.append([x - 1, y])
			if x + 1 < n:
				if maze[x + 1][y] != '#' and mp([x + 1, y]) not in visited:
					visited[mp([x + 1, y])] = True
					temp.append([x + 1, y])
			if y - 1 >= 0:
				if maze[x][y - 1] != '#' and mp([x, y - 1]) not in visited:
					visited[mp([x, y - 1])] = True
					temp.append([x, y - 1])
			if y + 1 < m:
				if maze[x][y + 1] != '#' and mp([x, y + 1]) not in visited:
					visited[mp([x, y + 1])] = True
					temp.append([x, y + 1])
		myq = temp
	return dist		


# main starts
n, m = list(map(int, input().split()))
maze = []
for _ in range(n):
	state = list(input().strip())
	maze.append(state)

# from random import randint
# for _ in range(1000):
# maze = []
# n = randint(1, 20)
# m = randint(1, 20)
# for i in range(n):
# 	temp = []
# 	for j in range(m):
# 		k = randint(1, 2)
# 		if k == 1:
# 			temp.append('.')
# 		else:
# 			temp.append('#')
# 	maze.append(temp)

ans = 0
for i in range(n):
	for j in range(m):
		if maze[i][j] != '#':
			first = [i, j]
			ans = max(ans, bfs(first))
print(ans)
n=int(input())
t,a=map(int,inout().split())
h=list(map(int,input().split()))
def abs(k,l):
  if k>l:
    return k-l
  else:
    return l-k  
b=20000313
cnt=0
for i in range(n):
  if b>abs(a,t-0.006*h[i]):
    b=t-0.006*h[i]
    cnt=i
  else:
    b=b
    cnt=cnt
print(cnt+1)

  
  
  

### FIXED CODE ###

n=int(input())
t,a=map(int,input().split())
h=list(map(int,input().split()))
def abs(k,l):
  if k>l:
    return k-l
  else:
    return l-k  
b=20000313
cnt=0
for i in range(n):
  if b>abs(a,t-0.006*h[i]):
    b=abs(a,t-0.006*h[i])
    cnt=i
  else:
    b=b
    cnt=cnt
print(cnt+1)
import sys

for line in sys.stdin:
    a, b = int(line.split())
    if(a <= b)
        print(a,b)
    else
        print(b,a)

### FIXED CODE ###


while True:
    a, b = input().split()
    a = int(a)
    b = int(b)

    if (a == 0) & (b == 0):
        break
    if a <= b:
        print(a, b)
    else:
        print(b, a)
import math
a, b, h, m = list(map(int, readline().split()))
deg_a = (60*h + m) * 0.5
deg_b = 6 * m
deg = abs(deg_a-deg_b)
rad = math.radians(deg)

c2 = a ** 2 + b ** 2 - 2 * a * b * math.cos(rad)
print(c2 ** 0.5)

### FIXED CODE ###

import sys

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


def main():
    a, b, h, m = list(map(int, readline().split()))
    deg_a = 30 * h + (m / 60) * 30
    deg_b = 6 * m
    if deg_a > deg_b:
        deg = deg_a - deg_b
    else:
        deg = deg_b - deg_a
    import math
    if deg > 180:
        deg = 360 - deg

    c2 = a ** 2 + b ** 2 - 2 * a * b * math.cos(math.radians(deg))
    print(c2 ** 0.5)


if __name__ == '__main__':
    main()
N, K = list(map(int, input()))
a = -(-N//K) - (N//K)
print(a)

### FIXED CODE ###

import math
N, K = list(map(int, input().split()))
x = N / K
print(math.ceil(x) - math.floor(x))
N, T = map(int, input().split())
ans = 1001
for i in range(n):
    c, t = map(int, input().split())
    if t > T:
        continue
    if ans > c:
        ans = c

if ans = 1001:
    print('TLE')
else:
    print(ans)


### FIXED CODE ###

N, T = map(int, input().split())
ans = 1001
for i in range(N):
    c, t = map(int, input().split())
    if t > T:
        continue
    if ans > c:
        ans = c

if ans == 1001:
    print('TLE')
else:
    print(ans)
N, K = map(int, input().split())
S = list(input())
l = len(S)
X = []
cnt0 = 0
cnt1 = 0
for i in S:
    if i == '0':
        if cnt1 != 0:
            X.append(cnt1)
            cnt1 = 0
            cnt0 += 1
        else:
            cnt0 += 1
    else:
        if cnt0 != 0:
            X.append(cnt0)
            cnt0 = 0
            cnt1 += 1
        else:
            cnt1 += 1
if cnt1 != 0:
    X.append(cnt1)
elif cnt0 != 0:
    X.append(cnt0)
ans = []
if S[0] == '1': #Xの奇数は1
    sum0 = sum(X[0:2*K+1])
    ans.append(sum0)
    i = 0
    if 2*K+1 >= len(X):
        ans = sum(X)
    else:
        while 2*K+i+1 < len(X):
            ans.append(ans[i] + X[2*K+i+1] - X[i])
            i += 1
else:
    sum0 = sum(X[0:2*K])
    ans.append(sum0)
    i = 0
    while 2*K+i < len(X):
        ans.append(ans[i] + X[2*K+i] - X[i])
        i += 1
print(max(ans))

### FIXED CODE ###

A,B=map(int,input().split())
s=0
if A > B:
    s=A+(A-1)
elif A < B:
    s=B+(B-1)
else:
    s=A+B
print(s)
A,B = map(int,input().split())

def gcd(a, b):
    while b:
        a, b = b, a % b
    return a


def lcm(a, b):
    return a * b // gcd (a, b)
  

print(lcm(a,b))


### FIXED CODE ###

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

def gcd(a, b):
    while b:
        a, b = b, a % b
    return a


def lcm(a, b):
    return a * b // gcd (a, b)
  

print(lcm(a,b))
import numpy as np
n, k = map(int,input().split())
a = [int(i) for i in input().split()]
best = 0
for i in range(k+1):
    aa = np.full(len(a), i)
    tmp = np.sum(a ^ aa)
    if best < tmp:
        best = tmp
print(best)

### FIXED CODE ###

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

# 最大値を取るf(x)のxを求める
# digitsは下位桁 < 上位桁で1になっているbitをカウントする
digits = [0] * 40
for i in range(40):
    for a in A:
        if (a >> i) & 1:
            digits[i] += 1

# Kを考慮してmax_xを求める方法がわからない
# 桁ごとに最適なbitはすでにわかっていて、他の桁のbitに影響を受けることはないので、
# 上位桁から見ていって、Kが1になっている部分ならフラグを立てる
# 上位桁から見てKが1のbitが出てから、K:1,max_x:0のフラグを立てたら、その桁より下位桁のbitはなんでもよくなる
check_K = True
max_x = 0
for i, d in enumerate(reversed(digits)):
    i = 40 - i - 1
    if check_K and K < pow(2, i):
        continue
    if d <= (N-d) and ((K >> i) & 1 == 1 or not check_K):
        max_x += 2 ** i
    elif (K >> i) & 1 == 1:
        check_K = False
    
#print(max_x)
ans = 0
for a in A:
    ans += a ^ max_x

print(ans)
list=input().split()
A=int(list[0])
B=int(list[1])
K=int(list[2])

if A >= K:
    print((A-K) + " " + B)
else:
    print("0 "+ str(max(B-(K-A),0)) )

### FIXED CODE ###

list=input().split()
A=int(list[0])
B=int(list[1])
K=int(list[2])

if A >= K:
    print(str((A-K)) + " " + str(B))
else:
    print("0 "+ str(max(B-(K-A),0)) )
import sys

a, b = [ int( val ) for val in sys.stdin.readline().split( ' ' ) ]
print( "{} {} {0:f}".format( a/b, a%b, float(a)/float(b) ) )

### FIXED CODE ###

import sys

a, b = [ int( val ) for val in sys.stdin.readline().split( ' ' ) ]
print( "{:d} {:d} {:7f}".format( a//b, a%b,  float(a)/float(b) ) )
n = (int)input()
while n > 0:
a[n] = (int)input()
j = 1
i = 0
max = a[j]-a[i]
 while i < n:
    while  j < n:
       if max < a[j]-a[i]:
          max = a[j]-a[i]
        j+ = 1
     i+ = 1
  print "max"

### FIXED CODE ###

N = int(raw_input())
min = int(raw_input())
max = int(raw_input())

ans = max - min
if max < min:
    min = max
 
for i in range(N - 2):
    R = int(raw_input())
    if R - min > ans:
        ans = R - min
    if R < min:
        min = R
 
print ans
a = input();
cnt = 0;
if(a == a[::-1]):
	cnt+=1
n = len(a)
if(a[:(n-1)//2] == a[:(n-1)//2:-1):
    cnt+=1
if(a[(n+3)//2::-1] == a[(n+3)//2:]):
    cnt+=1
if(cnt == 3):
    print("Yes")
else:
   	print("No")

### FIXED CODE ###

a = input();
cnt = 0;
if(a == a[::-1]):
	cnt+=1
n = len(a)
if(a[:(n-1)//2] == a[:(n-1)//2:-1]):
    cnt+=1
if(a[(n+3)//2-1::][::-1] == a[(n+3)//2-1:]):
    cnt+=1
if(cnt == 3):
    print("Yes")
else:
   	print("No")
#ABC166
N,M=map(int,input().split())
H =list(map(int,input().split()))  #展望台の標高
A = list(range(N))
for i in range(M):
    a, b = map(int, input().split())
    if H[a-1] > H[b-1]:
        A[b-1] = 0
    elif H[a-1] < H[b-1]:
        A[a-1] = 0
    else:
        A[a-1] = 0 and A[b-1] = 0

print(N-A.count(0))

### FIXED CODE ###

#ABC166
N,M=map(int,input().split())
H =list(map(int,input().split()))  #展望台の標高
A = list(range(1,N+1))
for i in range(M):
    a, b = map(int, input().split())
    if H[a-1] > H[b-1]:
        A[b-1] = 0
    elif H[a-1] < H[b-1]:
        A[a-1] = 0
    else:
        A[a-1] = 0
        A[b-1] = 0
print(N-A.count(0))
import math
#1st line
pos_x1, pos_y1, pos_x2, pos_y2 = map(int,input().split(" "))

dist = math.sqrt((pos_x1-pos_x2)**2 + (pos_y1 - pos_y2)**2)
print(str(dist))

### FIXED CODE ###

import math
#1st line
pos_x1, pos_y1, pos_x2, pos_y2 = map(float,input().split(" "))

dist = math.sqrt((pos_x1-pos_x2)**2 + (pos_y1 - pos_y2)**2)
print(str(dist))
def solve(n, s):

    r_list = [i for i in range(n) if s[i] == "R"]
    g_list = [i for i in range(n) if s[i] == "G"]
    # b_list = [i for i in range(n) if s[i] == "B"]
    b_dict = {i: 1 for i in range(n) if s[i] == "B"}

    res = len(r_list) * len(g_list) * len(b_list)
    for i in r_list:
        for j in g_list:
            # candidate
            m, n = min(i, j), max(i, j)
            if n + (n - m) in b_dict.keys():
                res -= 1
            if m - (n - m) in b_dict.keys():
                res -= 1
            if (n - m) % 2 == 0 and (n + m) // 2 in b_dict.keys():
                res -= 1

    return res


def main():
    n = int(input())
    s = input()
    res = solve(n, s)
    print(res)


def test():
    assert solve(4, "RRGB") == 1
    assert solve(39, "RBRBGRBGGBBRRGBBRRRBGGBRBGBRBGBRBBBGBBB") == 1800


if __name__ == "__main__":
    test()
    main()


### FIXED CODE ###

def solve(n, s):

    r_list = [i for i in range(n) if s[i] == "R"]
    g_list = [i for i in range(n) if s[i] == "G"]
    # b_list = [i for i in range(n) if s[i] == "B"]
    b_dict = {i: 1 for i in range(n) if s[i] == "B"}

    res = len(r_list) * len(g_list) * len(b_dict.keys())
    for i in r_list:
        for j in g_list:
            # candidate
            m, n = min(i, j), max(i, j)
            if n + (n - m) in b_dict.keys():
                res -= 1
            if m - (n - m) in b_dict.keys():
                res -= 1
            if (n - m) % 2 == 0 and (n + m) // 2 in b_dict.keys():
                res -= 1

    return res


def main():
    n = int(input())
    s = input()
    res = solve(n, s)
    print(res)


def test():
    assert solve(4, "RRGB") == 1
    assert solve(39, "RBRBGRBGGBBRRGBBRRRBGGBRBGBRBGBRBBBGBBB") == 1800


if __name__ == "__main__":
    test()
    main()
N = int(input())
A = list(map(int,input().split(" ")))
A.sort()
used = [0] * N
pow2_set = reversed([ 1<<i for i in range(25)])
ans = 0
for pow2 in pow2_set:
    l,r = 0,N-1
    while l < r:
        if A[l] + A[r] < pow2:
            l += 1
        elif A[l] + A[r] == pow2:
            if used[l] == 0 and used[r] == 0:
                ans += 1
                used[l],used[r] = 1,1
            else:
                if used[l] == 1:
                    l += 1
                if used[r] == 1:
                    r += 1
        else:
            r -= 1

print(ans)

### FIXED CODE ###

N = int(input())
A = list(map(int,input().split(" ")))
A.sort()
used = [0] * N
pow2_set = reversed([ 1<<i for i in range(36)])
ans = 0
for pow2 in pow2_set:
    l,r = 0,N-1
    while l < r:
        if A[l] + A[r] < pow2:
            l += 1
        elif A[l] + A[r] == pow2:
            if used[l] == 0 and used[r] == 0:
                ans += 1
                used[l],used[r] = 1,1
            else:
                if used[l] == 1:
                    l += 1
                if used[r] == 1:
                    r -= 1
        else:
            r -= 1

print(ans)
while True:
    a,b = list(map(int, input().split(" ")))
    if a == b == 0:
        break
    for i in range(1,a+1):
        if i % 2 != 0:
            if b % 2 == 0:
                print('#.' * (b / 2))
            else:
                print('#.' * ((b -1) /2) + '#')
        else:
            if b % 2 == 0:
                print('.#' * (b / 2))
            else:
                print('.#' * ((b -1) /2) + '.')
    print()

### FIXED CODE ###

while True:
    a = list(map(int, input().split()))
    b = a[0]
    c = a[1]
    if b == c == 0:
        break
    for i in range(1, b+1):
        if i % 2 != 0:
            if c % 2 == 0:
                print('#.' * (c // 2))
            else:
                print('#.' * (c // 2) + '#')
        else:
            if c % 2 == 0:
                print('.#' * (c // 2))
            else:
                print('.#' * (c // 2) + '.')
    print()
import sys
import numpy as np
import time

if __name__ == '__main__':
    n, q = map(int, input().split())

    board = np.zeros(n+1, dtype=np.int64)

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

    cumsum = np.cumsum(board)

    for i in range(n):
        print(int(cumsum[i])%2, end="")
    print()



### FIXED CODE ###

import sys

if __name__ == '__main__':
    n = int(input())
    a = list(map(int, input().split()))

    ans = [False for i in range(n)]

    for i in range(n-1, -1, -1):
        num = i + 1
        j = 2
        accum = 0
        while num * j <= n:
            accum = (accum + ans[num * j - 1]) % 2
            j += 1
        ans[i] = (not accum == a[i])

    out = list()
    for i in range(n):
        if ans[i]:
            out.append(i + 1)
    print(len(out))
    print(*out)
n = int(input())
edge=[[] for _ in range(n+1)]
for _ in range(n-1):
    u,v,w = map(int,input().split())
    edge[u].append((v,w%2))
    edge[v].append((u,w%2))

color =[-1]*(n+1)
def dfs(node,edge):
    for next_node,w in edge[node]:
        if color[next_node] != -1:
            continue
        if w == 1:
            color[next_node] = color[node]^1
        else:
            color[next_node] = color[node]
        dfs(next_node,edge)
        
        
color[1] = 0
dfs(1,edge)
color = color[1:]
print(*color,sep="\n")

### FIXED CODE ###

import sys

sys.setrecursionlimit(10**6)

n = int(input())
if n == 1:
    print(1)
else:
    edge=[[] for _ in range(n)]
    for _ in range(n-1):
        u,v,w = map(int,input().split())
        edge[u-1].append((v-1,w%2))
        edge[v-1].append((u-1,w%2))
 
    color =[-1]*n
    def dfs(node,edge):
        for next_node,w in edge[node]:
            if color[next_node] != -1:
                continue
            if w == 1:
                color[next_node] = color[node]^1
            elif w == 0:
                color[next_node] = color[node]
            dfs(next_node,edge)
        
        
    color[0] = 0
    dfs(0,edge)
    print(*color,sep="\n")
# -*- coding: utf-8 -*-

import os
import sys
import math
import numpy as np

n, m = map(int, input().split())
X = input().split()
X = list(map(int, X))
Y = input().split()
Y = list(map(int, Y))


# 1 つの最小長方形は (n-1)*(m-1) 回加算される

S = 0
mod = 10 ** 9 + 7

for x in range(n-1):
	for y in range(m-1):
		var = (X[x+1]-X[x]) * (Y[y+1]-Y[y])
		# print(var)
		x_times = (x+1) * (n-x-1)
		y_times = (y+1) * (m-y-1)

		S += ((var * x_times * y_times) % mod)


print(S%mod)

### FIXED CODE ###

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

import os
import sys
import math
import numpy as np

a, b, c = map(int, input().split())
if (b - a) == (c - b):
    print('YES')
else:
    print('NO')
n=int(input())
a=int(input())
print(['Yes','No'][n%500>a]

### FIXED CODE ###

n=int(input())
a=int(input())
print(['Yes','No'][n%500>a])
N = int(input())
A = []
B = []
for _ in range(N):
  a, b = map(int, input().split())
  A.append(a)
  B.append(b)
  
if A == B:
  print(0)
else:
  M = sum(A)
  c = 0
  for a, b in zip(A, B):
    c = max(a - b)
  print(M - c)

### FIXED CODE ###

N = int(input())
A = []
B = []
for _ in range(N):
  a, b = map(int, input().split())
  A.append(a)
  B.append(b)
  
if A == B:
  print(0)
else:
  M = sum(A)
  c = 10**10
  for a, b in zip(A, B):
    if a > b:
      c = min(c, b)
  print(M - c)
s = int(input())
m = s/60
h = m/60

print(h,m,s,sep=":"):

### FIXED CODE ###

a = int(input())
h = int(a/3600)
m=int((a%3600)/60)
s=int((a%3600)%60)

print(h,m,s,sep=":")
a,b=input().split()
x= (a=="H")
y=(b=="H")
if :x and y or not x and not y
  print("H")
else:
  print("D")

### FIXED CODE ###

a,b=input().split()
x= (a=="H")
y=(b=="H")
if x and y or not x and not y:
  print("H")
else:
  print("D")
N, K = map(int, input().split())
A = list(map(int, input().split()))
MOD = 10**9 + 7
if K == N:
    #そのままが答え
    ans = 1
    for a in A:
        ans *= a
        ans %= MOD
    print(ans % MOD)
    exit()

# pos = [a for a in A if a > 0]
neg = [a for a in A if a < 0]
n_neg = len(neg)
if n_neg == N and K % 2 == 1:
    #負になるしかない
    A.sort(reverse=True)
    ans = 1
    for i in range(K):
        ans *= A[i]
        ans %= MOD
    print(ans % MOD)
    exit()

# 正にできる
A.sort(key=lambda x: abs(x), reverse=True)
P = 1
is_p_neg = 0
for i in range(K):
    P *= A[i]
    if A[i] < 0:
        is_p_neg = not(is_p_neg)
        P %= MOD

if not is_p_neg:
    # P >= 0なら答え
    print(P%MOD)
    exit()

ng_left = N
ng_right = N
not_ng_right = N
po_left = N
for i in range(N):
    if A[i] > 0:
        po_left = i
        break
for i in range(N):
    if A[i] < 0:
        ng_left = i
        break
for i in range(K, N):
    if A[i] >= 0:
        not_ng_right = i
        break
for i in range(K, N):
    if A[i] > 0:
        ng_right = i
        break

A += [None] # right側のポインターが初期のままかどうかを判別
x1 = A[ng_left]
y1 = A[not_ng_right]
x2 = A[po_left]
y2 = A[ng_right]
if y1 is None:
    P //= x2
    P *= y2
    P %= MOD
elif y2 is None:
    P //= x1
    P *= y1
    P %= MOD
else:
    if abs(y1*x2) < abs(y2*x1):
        P //= x2
        P *= y2
        P %= MOD
    else:
        P //= x1
        P *= y1
        P %= MOD
print(P %MOD)

### FIXED CODE ###

N, K = map(int, input().split())
X = list(map(int, input().split()))
MOD = 10 ** 9 + 7
 
pos = sorted(v for v in X if v >= 0)
neg = sorted(-v for v in X if v < 0)
if N == K:
    ans = 1
    for x in X:
        ans *= x
        ans %= MOD
    print(ans % MOD)
    exit()
ok = False  # True: ans>=0, False: ans<0
if pos:
    #正の数があるとき
    ok = True
else:
    #全部負-> Kが奇数なら負にならざるをえない。
    ok = (K % 2 == 0)
 
ans = 1
if ok:
    # ans >= 0
    if K % 2 == 1:
        #Kが奇数の場合初めに1つ正の数を掛けておく
        #こうすれば後に非負でも負でも2つずつのペアで
        #考えられる
        ans = ans * pos.pop() % MOD
 
    # 答えは非負になる→二つの数の積は必ず非負になる．
    cand = []
    while len(pos) >= 2:
        x = pos.pop() * pos.pop()
        cand.append(x)
 
    while len(neg) >= 2:
        x = neg.pop() * neg.pop()
        cand.append(x)
 
    cand.sort(reverse=True) # ペアの積が格納されているので必ず非負
    # ペア毎に掛けていく
    for i in range(K // 2):
        ans = ans * cand[i] % MOD
else:
    # ans <= 0
    cand = sorted(X, key=lambda x: abs(x))
    for i in range(K):
        ans = ans * cand[i] % MOD
 
print(ans)
import numpy as np
x, y = map(int, input().split())
table = np.ones((x+1, y+1)) * -1

for i in range(x):
  table[i,0] = 0
for j in range(y):
  table[0,j] = 0
table[0,0] = 1


for i in range(1,x+1):
  for j in range(1,y+1):
     a1 = 0
     a2 = 0
     if i-1 >= 0 and  j-2 >= 0:
        a1 = table[i-1, j-2]
     if i-2 >= 0 and  j-1 >= 0:
      	a2 = table[i-2,j-1]
     table[i,j] = a1 + a2

print(int(table[x,y] % (1e9+7)))



### FIXED CODE ###

def ext_gcd(p, a):
  #require a, m be relative prime
  #m > a  
  if a == 0:
    return 1, 0
  else:
    x1, y1 = ext_gcd(a, p%a)
    y = x1 - y1 * int(p/a)
    x = y1
    return x, y

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

n = (2 * y - x)/3
m = (2 * x - y)/3

if n != int(n) or m != int(m) or n<0 or m<0:
  ans = 0
else:
   n = int(n)
   m = int(m)
   if n < m :
      c = m
      m = n
      n = c
   # (n+m!)/(n!)(m!) mod (1e9+7)
   ans = 1
   prime = 1000000007 
   for i in range(n+1,m+n+1):
        ans = int(ans * i) 
        ans = (ans % prime)
   for i in range(1, m+1):
      ori_inv = int(ext_gcd(prime, i)[1])
      while ori_inv < 0 :
        ori_inv += prime
      ans = int(ans * ori_inv)  
      ans = (ans % prime)
print(ans)
import numpy as np

n, l = [int(i) for i in input().split(' ')]

nl = np.array([i for i in range(n)]) + 1
ll = nl + l - 1

mini = np.where(ll == np.min(np.absolute(ll)))
ll = list(ll)
del ll[mini[0][0]]

print(np.sum(ll))

### FIXED CODE ###

import numpy as np

n, l = [int(i) for i in input().split(" ")]

nl = np.array([i for i in range(n)]) + 1
ll = nl + l - 1

mini = np.where(np.absolute(ll) == np.min(np.absolute(ll)))
ll = list(ll)
del ll[mini[0][0]]

print(np.sum(ll))
raw_input()
ls = map(int, raw_input())
ls.sort()
ls.reverse()
i = 0
answer = []
while i < len(ls) - 1:
  if ls[i] == ls[i+1]:
    answer.append(ls[i])
    if len(answer) >= 2:
      break
    i += 2

if len(answer) == 2:
  print answer[0] * answer[1]
else:
  print 0

### FIXED CODE ###

raw_input()
ls = map(int, raw_input().split(" "))
ls.sort()
ls.reverse()
i = 0
answer = []
while i < len(ls) - 1:
  if ls[i] == ls[i+1]:
    answer.append(ls[i])
    if len(answer) >= 2:
      break
    i += 1
  i += 1

if len(answer) == 2:
  print answer[0] * answer[1]
else:
  print 0