Harryxun/stf_run huggingface dataset:
# -*- coding: utf-8 -*-
n, m = map(int, input().split())
BIGNUM = 10 ** 9 + 7

last_ana = int(input())
blocks = [last_ana]

for _ in range(1, m):
    ana = int(input())
    blocks.append(ana - last_ana - 1)
    last_ana = ana

blocks.append(n - last_ana)

if 0 in blocks:
    ans = 0
else:
    b_max = max(blocks)

    c = [1, 1]
    for i in range(2, b_max):
        ctmp = c[i - 1] + c[i - 2]
        c.append(ctmp % BIGNUM)

    ans = 1
    for num in blocks:
        if num == 1:
            continue
        ans = (ans * c[num - 1]) % BIGNUM
        if ans == 0:
            break

print(ans)

### FIXED CODE ###

# -*- coding: utf-8 -*-
n, m = map(int, input().split())
BIGNUM = 10 ** 9 + 7

if m > 0:
    last_ana = int(input())
    blocks = [last_ana]

    for _ in range(1, m):
        ana = int(input())
        blocks.append(ana - last_ana - 1)
        last_ana = ana
    blocks.append(n - last_ana)
else:
    blocks = [n + 1]

if 0 in blocks:
    ans = 0
else:
    b_max = max(blocks)
    c = [1, 1]
    for i in range(2, b_max):
        ctmp = c[i - 1] + c[i - 2]
        c.append(ctmp % BIGNUM)

    ans = 1
    for num in blocks:
        if num == 1:
            continue
        ans = (ans * c[num - 1]) % BIGNUM
        if ans == 0:
            break

print(ans)
import sys
sys.setrecursionlimit(10 ** 7)
input = sys.stdin.readline
s = input()
l = len(s)

INF = float('inf')
dp = [[INF]*2 for _ in range(l+1)]
dp[0][0]=0
dp[0][1]=1
for i in range(l):
    num = int(s[i])
    dp0 = dp[i][0]
    dp1 = dp[i][1]
    dp[i+1][0] = min(dp0+num, dp1+min(10-num,num+1))
    dp[i+1][1] = min(dp0+num+1,dp1+10-num-1)

print(dp[-1][0])


### FIXED CODE ###

s = input()
l = len(s)

INF = float('inf')
dp = [[INF]*2 for _ in range(l+1)]
dp[0][0]=0
dp[0][1]=1
for i in range(l):
    num = int(s[i])
    dp0 = dp[i][0]
    dp1 = dp[i][1]
    dp[i+1][0] = min(dp0+num, dp1+min(10-num,num+1))
    dp[i+1][1] = min(dp0+num+1,dp1+10-num-1)

print(dp[-1][0])
import bisect
from collections import deque
n = int(input())
a = [int(i) for i in input().split()]


a_sum = [0]
for i in range(n):
    a_sum.append((a_sum[-1]+a[i]))

val = deque([])
cnt = deque([])
for i in range(n+1):
    idx = bisect.bisect_left(val, a_sum[i])
    if len(val) > idx and val[idx] == a_sum[i]:
        cnt[idx] += 1
    else:
        val.insert(idx, a_sum[i])
        cnt.insert(idx, 1)

ans = 0
for i in range(len(cnt)):
    ans += cnt[i]*(cnt[i]-1)//2

print(ans)

### FIXED CODE ###

from collections import Counter

n = int(input())
a = [int(i) for i in input().split()]

a_sum = [0]
for i in range(n):
    a_sum.append((a_sum[-1]+a[i]))

cnt = Counter(a_sum)

ans = 0
for v in cnt.values():
    ans += v*(v-1)//2

print(ans)
S = input()
K = int(input())
if S[0] == "1":
    print(list(set(S))[1])
else:
    print(S[0])


### FIXED CODE ###

S = list(input())
K = int(input())
for i in range(K):
    if S[i] != "1":
        print(S[i])
        break
else:
    print("1")
import sys
sys.setrecursionlimit(10000000)

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

D = [0]

def f(a):
  if a <= N:
    M = max(A[a:N+1])
    Mi = A.index(M)
    m = min(A[a-1:Mi])
    d = M - m
    if D[-1] == d:
      D.append(d)
    elif D[-1] < d:
      D.clear()
      D.append(d)
    f(Mi+2)
  else:
    pass

f(1)

result = len(D)
print(result)


### FIXED CODE ###

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

B = []
Amin = A[0]

for i in range(1, N):
  if A[i] < Amin:
    Amin = A[i]
  else:
    B.append(A[i] - Amin)

result = B.count(max(B))
print(result)
import re

first_line = input().split()
n = int(first_line[0])
m = int(first_line[1])

n_list = []
for i in range(n):
    n_list.append(input())
m_list = []
for i in range(m):
    m_list.append(input())

match_flg = False
for i in range(0, n - m + 1):
    matchOb = re.match(m_list[0], n_list[i])
    if matchOb:
        start_pos = matchOb.start()
        end_pos = matchOb.end()
        for j in range(0, m):
            if n_list[i + j][start_pos:end_pos] == m_list[j] and j == m - 1:
                match_flg = True
            elif n_list[i + j][start_pos:end_pos] != m_list[j]:
                break

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


### FIXED CODE ###

cards = input().split()
alice = int(cards[0])
bob = int(cards[1])

if alice == bob:
    print("Draw")
elif alice == 1:
    print("Alice")
elif bob == 1:
    print("Bob")
elif alice < bob:
    print("Bob")
else :
    print("Alice")
import sys
input = sys.stdin.readline
# sys.setrecursionlimit(100000)

def main():
    S = int(input().strip())
    return S.replace("?","D")

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

### FIXED CODE ###

import sys
input = sys.stdin.readline
# sys.setrecursionlimit(100000)

def main():
    S = input().strip()
    return S.replace("?","D")

if __name__ == "__main__":
    print(main())
# -*- coding: utf-8 -*-
from sys import stdin
import math

d_in = lambda: int(stdin.readline())  # N = d_in()


def decimal2bit(n, m):
    """
    nのm進数表現
    """
    order = int(math.log(n, m))
    ans = []
    for i in range(order, -1, -1):
        ans.append(n // (m ** i))
        n -= m ** i * ans[-1]
    return ans


def search(n):
    ans = sum(decimal2bit(n, 6))
    for i in range(1, n // 9 + 1):
        nine = decimal2bit(9 * i, 9)
        six = decimal2bit(n - 9 * i, 6)
        ans = min(ans, sum(nine) + sum(six))
    print(ans)


if __name__ == '__main__':
    N = d_in()
    search(N)

### FIXED CODE ###

# -*- coding: utf-8 -*-
from sys import stdin


d_in = lambda: int(stdin.readline())  # N = d_in()


def get_order(n, m):
    order = 0
    while n > 0:
        n = n // m
        order += 1
    return order


def decimal2bit(n, m):
    """
    nのm進数表現
    """
    if n == 0:
        return []
    order = get_order(n, m)
    ans = []
    for i in range(order, -1, -1):
        ans.append(n // (m ** i))
        n -= m ** i * ans[-1]
    return ans


def search(n):
    ans = float('inf')
    for i in range(n // 9 + 1):
        nine = decimal2bit(9 * i, 9)
        six = decimal2bit(n - 9 * i, 6)
        ans = min(ans, sum(nine) + sum(six))
    print(ans)


if __name__ == '__main__':
    N = d_in()
    search(N)
n = int(input())
ary = list(map(int,input().split()))
ans = 0
for i in range(n):
    if i+1 == ary[i]:
        a = ary[i]
        b = ary[i+1]
        ary[i] = b
        ary[i+1] = a
        ans += 1
    else:continue
print(ans)

### FIXED CODE ###

n = int(input())
ary = list(map(int,input().split()))
ans = 0
for i in range(n):
    if i == n-1 and i+1 == ary[i]:
        ans += 1
    elif i+1 == ary[i]:
        a = ary[i]
        b = ary[i+1]
        ary[i] = b
        ary[i+1] = a
        ans += 1
    else:continue
print(ans)
import math

def agcd(l):
    a=math.gcd(l[0],l[1])
    for i in range(2,len(l)):
        a=math.gcd(a,l[i])
    return a

N,X=map(int,input().split())
print(agcd([abs(i-X) for i in list(map(int,input().split()))]))

### FIXED CODE ###

import math

def agcd(l):
    a=math.gcd(l[0],l[1])
    for i in range(2,len(l)):
        a=math.gcd(a,l[i])
    return a

N,X=map(int,input().split())
x=[abs(i-X) for i in list(map(int,input().split()))]

print(agcd(x)if 1<N else x[0])
A,B,C,D = map(int, input().split())
def gcd(x, y):
    if x == 0:
        return y
    else:
        return gcd(y % x, x)
def lcm(x,y):
    return x * y // gcd(x,y)
L = lcm(C,D)
b = B - (B // C) - (B // D) + (B // L)
a = (A-1) - ((A-1) // C) - ((A-1) // D) + ((A-1) // L)
print(b - a)

### FIXED CODE ###

S = input()

S1 = S[0]
S2 = S[1]
S3 = S[2]
S4 = S[3]

flg = "Good"

if S1 == S2:
  flg = "Bad"
elif S2 == S3:
  flg = "Bad"
elif S3 == S4:
  flg = "Bad"

print(flg)
data_a = [ABCDEFGHIJKLMNOPQRSTUVWXYZ]
data_b = [abcdefghijklmnopqrstuvwxyz]

n = input()

if n in data_a:
  print('A')

else:
  print('a')

### FIXED CODE ###

data_a = ['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']

n = input()

if n in data_a:
  print('A')

else:
  print('a')
6 727202214173249351
6 5 2 5 3 2
n, k = [int(i) for i in input().split()]
a = [int(i) for i in input().split()]
s = []
o = [-1] * (n + 1)  # ord 訪れた箇所, v が1スタートなので注意
c, l = 1, 0  # 周期, 例外

v = 1
while o[v] == -1:
    o[v] = len(s)
    s.append(v)
    v = a[v-1]
c = len(s) - o[v]
l = o[v]

if k < l:
    print(s[k])
else:
    k -= l
    k %= c
    print(s[l + k])


### FIXED CODE ###

n, k = [int(i) for i in input().split()]
a = [int(i) for i in input().split()]
s = []
o = [-1] * (n + 1)  # ord 訪れた箇所, v が1スタートなので注意
c, l = 1, 0  # 周期, 例外

v = 1
while o[v] == -1:
    o[v] = len(s)
    s.append(v)
    v = a[v-1]
c = len(s) - o[v]
l = o[v]

if k < l:
    print(s[k])
else:
    k -= l
    k %= c
    print(s[l + k])
H, W, K = map(int, input().split())

C = []
for _ in range(H):
    C.append(input())

from pprint import pprint
# pprint(C)
import sys
from collections import Counter
from itertools import product, combinations

counter = Counter()
for row in C:
    counter.update(row)
n_blacks = counter['#']

if n_blacks < K:
    print(0)
    sys.exit()
# elif n_blacks == K:
#     # 黒がいない行、列があると破綻するからこの elif は NG
#     print(1)
#     sys.exit()


board = ''
for row in C:
    board += row

pprint(board)

def get_calc_board_index_row(board, n_rows, n_cols):
    b = board
    _n_rows = n_rows
    _n_cols = n_cols
    def fun(n_row):
        # row number
        return list(range(_n_rows * n_row, _n_rows * n_row + _n_cols))
    return fun

calc_board_index_row = get_calc_board_index_row(board=board, n_rows=H, n_cols=W)

def get_calc_board_index_col(board, n_rows, n_cols):
    b = board
    _n_rows = n_rows
    _n_cols = n_cols
    def fun(n_col):
        # row number
        return list(range(
            n_col,
            n_col + _n_rows * _n_cols,
            _n_cols))
    return fun

calc_board_index_col = get_calc_board_index_col(board=board, n_rows=H, n_cols=W)

def get_print_board(board, n_rows, n_cols):
    b = board
    _n_rows = n_rows
    _n_cols = n_cols
    def fun():
        # row number
        for r in _n_rows:
            print(b[r*_n_cols, r*_n_cols+_n_cols])
    return fun

print_board = get_print_board(board, H, W)

# sys.exit()

# 消し込む行と列の数 (n_row, n_col) について、すべてのパターンで繰り返す
# i = 0
ans = 0
for n_row, n_col in product(range(H), range(K)):
    # n_row 個の行を消し込む場合の、行番号の組み合わせ
    choosed_rows = list(combinations(range(H), n_row))
    # n_col 個の列を消し込む場合の、列番号の組み合わせ
    choosed_cols = list(combinations(range(W), n_col))

    # 消し込みするマスを計算
    board_idx = set()
    # for removing_row_numbers in choosed_rows:
    #     for r in removing_row_numbers:
    #         board_idx.update(calc_board_index_row(r))
    # for removing_col_numbers in choosed_cols:        
    #     for c in removing_col_numbers:
    #         board_idx.update(calc_board_index_col(c))
    for i_r, i_c in product(range(len(choosed_rows)), range(len(choosed_cols))):
        for _ in choosed_rows[i_r]:
            board_idx.update(calc_board_index_row(_))
        for _ in choosed_cols[i_c]:
            board_idx.update(calc_board_index_col(_))

        rest_blacks = 0
        for ix in range(len(board)):
            if ix in board_idx: continue
            if board[ix] == '#': rest_blacks += 1

        if rest_blacks == K:
            # print(removing_row_numbers, removing_col_numbers)
            ans += 1
    # print({
    #     'n_row': n_row,
    #     'n_col': n_col,
    #     'choosed_rows': choosed_rows,
    #     'choosed_cols' : choosed_cols,
    #     'board_idx': board_idx,
    #     'rest_blacks': rest_blacks
    # })
    # print()

print(ans)

### FIXED CODE ###

from collections import Counter

N = int(input())
S = []
for i in range(N):
    s_in = input()
    # if s_in == '' or s_in is None: break
    S.append(s_in)

counter = Counter(S)
for ans in ['AC', 'WA', 'TLE', 'RE']:
    print(f'{ans} x {counter[ans]}')
n = int(input())

if n%2==0:
    print(n/2/n)
else:
    print(((n/2)+1)/n

### FIXED CODE ###

n = int(input())
if n % 2 == 0:
    print(n/2/n)
else:
    chi = n//2 + 1
    print(chi/n)
n = int(input())
list_d=[input() for i in range(n)]
new_list_d = set(list_d)
sum1 = len(list(new_list_d))
print(sum1)

### FIXED CODE ###

s = input()
print(s.replace('2017', '2018'))
a, op, b = map(str, input().split())

a = int(a)
b = int(b)

if op == "+":
  print(a + b)
eles: 
  print(a - b)

### FIXED CODE ###

a, op, b = map(str, input().split())

a = int(a)
b = int(b)

if op == "+":
  print(a + b)
else: 
  print(a - b)
from collections import deque
import bisect

N = int(input())
A = [int(input()) for _ in range(N)]

colors = deque([A[0]])
for a in A[1:]:
    i = bisect.bisect_left(colors, a)
    if i == 0:
        colors.appendleft(a)
    else:
        del colors[i - 1]
        bisect.insort_left(colors, a)

print(len(colors))


### FIXED CODE ###

from collections import deque
import bisect

N = int(input())
A = [int(input()) for _ in range(N)]

colors = deque([A[0]])
for a in A[1:]:
    i = bisect.bisect_left(colors, a)
    if i != 0:
        colors[i - 1] = a
    else:
        colors.appendleft(a)

print(len(colors))
from collections import deque
import bisect

n, m = map(int, input().split())
a = deque(sorted(list(map(int, input().split()))))

for i in range(m):
  x = a.pop()//2
  a.insert(bisect.bisect_left(a, x),x)
print(sum(a))


### FIXED CODE ###

import heapq

N, M = map(int, input().split())
A = list(map(lambda x:[-int(x),int(x)], input().split()))
heapq.heapify(A)

for m in range(M):
  x = heapq.heappop(A)
  x[1] //= 2
  x[0] = -x[1]
  heapq.heappush(A, x)
ans = 0
for a in A:
  ans += a[1]
print(ans)
n,*s=map(int,open(0).read().split())
print('TFhoruere'[len(set(s))==4::2])

### FIXED CODE ###

_,*s=map(str,open(0).read().split())
print('TFhoruere'[len(set(s))==4::2])
r,d,x=map(int,input().split())
for i range(10):
  x=rx-d
  print(x)

### FIXED CODE ###

r,d,x=map(int,input().split())
for i in range(10):
  x=r*x-d
  print(x)
import numpy

n,k = map(int,input().split())
p = list(map(int,input().split()))
q = []
for i in range(n):
    q.append(((((p[i]+1)*p[i])/2)/p[i]))
res = numpy.cumsum(q)
print(q)
ans = []
ans.append(q[k-1])
for i in range(k,n):
  ans.append(res[i]-res[i-k])
print(max(ans))

### FIXED CODE ###

import numpy

n,k = map(int,input().split())
p = list(map(int,input().split()))
q = []
for i in range(n):
    q.append(((((p[i]+1)*p[i])/2)/p[i]))

res = numpy.cumsum(q)
ans = []
ans.append(res[k-1])
for i in range(k,n):
  ans.append(res[i]-res[i-k])
print(max(ans))
from heapq import heapify, heappop, heappush

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

slice_L = [list(sorted(v[:i])) for i in range(N + 1)]
sum_L = [sum(slice_L[i]) for i in range(N + 1)]

slice_R = [list(sorted(v[N - 1 - i:])) for i in range(-1, N)]
sum_R = [sum(slice_R[i]) for i in range(N + 1)]

ans = 0
for put, pick in enumerate(tuple(range(K, 0, -1)), 0):
    for left in range(pick + 1):
        m_put = put
        right = pick - left
        t = sum(slice_L[left]) + sum(slice_R[right])

        q = slice_L[left] + slice_R[right]
        heapify(q)
        while m_put > 0 and q:
            t -= heappop(q)
            m_put -= 1
        if m_put > 0:
            continue
        ans = max(ans, t)
print(ans)


### FIXED CODE ###

from heapq import heapify, heappop

N, K = map(int, input().split())
vl = list(map(int, input().split()))
vr = list(reversed(vl))
sum_L = [0]
for vv in vl:
    sum_L.append(sum_L[-1] + vv)

sum_R = [0]
for vv in vr:
    sum_R.append(sum_R[-1] + vv)

ans = 0
for pick in range(min(K, N) + 1):
    for to_remove in range(K + 1):
        if pick + to_remove > K: break
        for left in range(pick + 1):
            right = pick - left

            t = sum_L[left] + sum_R[right]

            q = vl[:left] + vr[:right]
            heapify(q)

            cnt = 0
            while cnt < to_remove and q:
                t -= heappop(q)
                cnt += 1
            ans = max(ans, t)
print(ans)
N, M = map(int,input().split())
A = [list(map(str,input().split())) for _ in range(M)]
#A = sorted(A, key=lambda x: x[0])

all_failure = 0
all_AC = 0
scan = 0
for j in range(N):
    while scan <= M:
        if int(A[scan][0]) == j+1 and A[scan][1] == "WA":
            all_failure += 1
            scan+=1

        elif int(A[scan][0]) == j+1 and A[scan][1] ==  "AC":
            all_AC+=1
            scan+=1
            break
        else:
            break
        
print(all_AC, all_failure)

### FIXED CODE ###

N, M = map(int, input().split())
pSs = [list(map(str, input().split())) for _ in range(M)]

#%%

ACs = [False for _ in range(N)]
WAs = [0 for _ in range(N)]

for pS in pSs:
    problem = int(pS[0]) -1
    answer = pS[1]
    if ACs[problem] == True:
        continue
    else:
        if answer == "WA":
            WAs[problem] += 1
        else:
            ACs[problem] = True

num_WA = 0
for i, WA in enumerate(WAs):
    if ACs[i] == True:
        num_WA += WA

print(sum(ACs), num_WA)
n = int(input())
print( int( n * (n+1)/2 - n) )


### FIXED CODE ###

forcast = input()
reality = input()

count = 0
for f, r in zip(forcast, reality):
  if f == r:
    count = count+1
print(count)
mod=1777777777
n,ma,mb=map(int,input().split())
d=[[mod for j in range(100)] for i in range(100)]
for i in range(n):
    a,b,c=map(int,input().split())
    x=a
    y=b
    for j in range(100-a,0,-1):
        for k in range(100-b-1,0,-1):
            if d[j][k]!=mod:
                d[j+a][k+b]=min(d[j+a][k+b],d[j][k]+c)
    d[x][y]=min(d[x][y],c)
ans=mod
for i in range(100):
    if i%ma==0 and mb*i//ma<100:
        ans=min(ans,d[i][mb*i//ma])

print([ans,-1][ans==mod])


### FIXED CODE ###

mod=1777777777
n,ma,mb=map(int,input().split())
d=[[mod for j in range(100)] for i in range(100)]
for i in range(n):
    a,b,c=map(int,input().split())
    x=a
    y=b
    for j in range(100-a-1,0,-1):
        for k in range(100-b-1,0,-1):
            if d[j][k]!=mod:
                d[j+a][k+b]=min(d[j+a][k+b],d[j][k]+c)
    d[x][y]=min(d[x][y],c)
ans=mod
for i in range(100):
    if i%ma==0 and mb*i//ma<100:
        ans=min(ans,d[i][mb*i//ma])

print([ans,-1][ans==mod])
N = int(input())
H = list(map(int, input().split()))
ans = 1
for i in range(1,N):
  if H[i]>=max(H[:i]):
    ans += 1
print(ans)

### FIXED CODE ###

s = list(str(input()))
S = []
for i in range(len(s)):
  S.append(int(s[i]))
ans1 = 100000
ans2 = 100000
ans = 0
t = 0
s = 0

if S[0]==0:
  for i in range(1,len(S),2):
    if S[i] != 1:
      t += 1
  for i in range(0,len(S),2):
    if S[i] != 0:
      s += 1
  ans1 = min(t+s,len(S)-t-s)
else:
  for i in range(1,len(S),2):
    if S[i] != 0:
      t += 1
  for i in range(0,len(S),2):
    if S[i] != 1:
      s += 1
  ans2 = min(t+s,len(S)-t-s) 
ans=min(ans1,ans2)
print(ans)
# -*- coding:utf-8 -*-
import sys
sys.setrecursionlimit(1000000)

def dfs(x, y, sym):
	tile[x][y] = "."
	for i in range(len(DX)):
		nx = x + DX[i]
		ny = y + DY[i]
		if nx>=0 and nx<N and ny>=0 and ny<M and tile[nx][ny]==sym:
			dfs(nx, ny, sym)

def solve():
	res = 0
	for i in range(N):
		for j in range(M):
			if tile[i][j] != ".":
				if tile[i][j] == "@":
					dfs(i, j, "@")
					res += 1
				elif tile[i][j] == "#":
					dfs(i, j, "#")
					res += 1
				elif tile[i][j] == "*":
					dfs(i, j, "*")
					res += 1
	print(res)
	
counter=0
DX = [-1, 0, 1, 0]
DY = [0, -1, 0, 1]
while True:
	counter+=1
	line = input()
	if ' ' in line:
		nums = line.split(" ")
		N = int(nums[0])
		M = int(nums[1])
		tile = [[0 for i in range(N)]for j in range(M)]
		if N==0 and M==0:
			break
	else:
		tile[counter-2] = list(line)
	if (counter-1)==M:
		solve()
		counter = 0

### FIXED CODE ###

# -*- coding:utf-8 -*-
import sys
def dfs(x, y, sym):
	tile[x][y] = "."
	for i in range(len(DX)):
		nx = x + DX[i]
		ny = y + DY[i]
		if (0<=nx and nx<N and 0<=ny and ny<M and tile[nx][ny] is sym):
			dfs(nx, ny, sym)

def solve():
	res = 0
	for i in range(N):
		for j in range(M):
			sym = tile[i][j]
			if tile[i][j] != ".":
				if tile[i][j] is sym:
					dfs(i, j, sym)
					res += 1
	print(res)

counter=0
DX = [-1,0,1,0]
DY = [0,-1,0,1]
sys.setrecursionlimit(10**7)
while True:
	line = input()
	if " " in line:
		nums = line.split(" ")
		N = int(nums[0])
		M = int(nums[1])
		tile = [[0 for i in range(M)] for j in range(N)]
	else:
		tile[counter-1] = list(line)
	if N is 0 and M is 0:
		break
	counter += 1
	if counter-1 is N:
		solve()
		counter = 0
li = list(map(int,input().split()))
ans = [li[0]+li[1],li[0]-li[1],li[1]-li[0],li[0]*li[1]].sort()
print(ans[3])

### FIXED CODE ###

li = list(map(int,input().split()))
ans = [li[0]+li[1],li[0]-li[1],li[0]*li[1]]
ans.sort()
print(ans[2])
def tonum(suit):
    if suit == 'S': return 0
    if suit == 'H': return 1
    if suit == 'C': return 2
    if suit == 'D': return 3

def tosuit(num):
    suits = ['S', 'H', 'C', 'D']
    return suits[num]

def main():
    n = int(input())
    cards = [i for i in range(52)]
    for i in range(n):
        a = input().split()
        cards.remove(tonum[a[0]] * 13 + int(a[1]))
    cards.reverse()
    for i in cards:
        print(tosuit(i // 13) + " " + (i % 13))

if __name__ == "__main__":
    main()


### FIXED CODE ###

def tonum(suit):
    if suit == 'S': return 0
    if suit == 'H': return 1
    if suit == 'C': return 2
    if suit == 'D': return 3
    
def tosuit(num):
    suits = ['S', 'H', 'C', 'D']
    return suits[num]
    
def main():
    n = int(input())
    cards = [i for i in range(52)]
    for i in range(n):
        a = input().split()
        cards.remove(tonum(a[0]) * 13 + int(a[1]) - 1)
    cards.sort()
    for i in cards:
        print(tosuit(i // 13) + " " + str(i % 13 + 1))
    
if __name__ == "__main__":
    main()
s=input()
t=input()
ans=""
k=0
l=0
for i in range(len(s)):
    x=i+k
    y=0
    if x>=len(s):
        break
    if s[i+k]==t[0]:
        for j in range(len(t)):
            if (s[x+j]==t[j] or s[x+j]=="?")and x+j<len(s):
                y+=1
            else:
                break
        if y==len(t):
            ans+=t
            k+=len(t)
            l=1
        
    else:
        ans+=s[i]

ans=ans.replace("?","a")  
if l==1:
    print(ans)    
else:
    print("UNRESTORABLE")

### FIXED CODE ###

s=input()
t=input()

ls=len(s)
lt=len(t)

def f(a,b):
    r=""
    for i in range(lt):
        if a[i]==b[i] or a[i]=="?":
            r+=b[i]
        else:
            return False
    return True
        
ans=[]

for i in range(ls-lt+1):
    c=""
    if f(s[i:i+lt],t):
        c+=s[0:i]
        c+=t
        c+=s[i+lt:ls]
        c=c.replace("?","a")
        ans.append(c)

if ans==[]:
    print("UNRESTORABLE")
else:
    print(min(ans))
from collections import Counter
import sys
if sys.platform == 'ios' or 'darwin':
    sys.stdin = open('input_file.txt')

N, P = map(int, input().split())
S = input()

ans = 0

if P == 2 or P == 5:
    for i in range(N):
        if int(S[-1 - i]) % 2 == 0:
            ans += N - i
else:
    M = []
    cum = [0]

    for i in range(N):
        M.append(pow(10, i, P) * int(S[-1 - i]) % P)

    for i in range(N):
        cum.append((cum[-1] + M[i]) % P)

    C = Counter(cum)

    for v in C.values():
        ans += v * (v - 1) // 2

print(ans)

### FIXED CODE ###

from collections import Counter

N, P = map(int, input().split())
S = input()

ans = 0

if P == 2 or P == 5:
    for i in range(N):
        if int(S[-1 - i]) % P == 0:
            ans += N - i
else:
    M = []
    cum = [0]

    for i in range(N):
        M.append(pow(10, i, P) * int(S[-1 - i]) % P)

    for i in range(N):
        cum.append((cum[-1] + M[i]) % P)

    C = Counter(cum)

    for v in C.values():
        ans += v * (v - 1) // 2

print(ans)
x,y=input().split()
if ord(x)<ord(y):
  print('<')
elif prd(x)>ord(y):
  print('>')
else:
  print('=')

### FIXED CODE ###

x,y=input().split()
if ord(x)<ord(y):
  print('<')
elif ord(x)>ord(y):
  print('>')
else:
  print('=')