Harryxun/stf_run huggingface dataset:
k = int(input())
if k % 2 == 0:
  print(-1)
nana = 0
ans = 0
print(len(k))
while True:
  nana += (10**ans) * 7
  #print(nana)
  if nana % k == 0:
    print(ans + 1)
    break
  ans += 1

### FIXED CODE ###

k = int(input())
if k % 2 == 0:
    print(-1)
elif k in [1,7]:
  	print(1)
else:
  amari = [7]
  tmp = 7
  for i in range(k):
      tmp = (tmp * 10) % k
      if tmp != 7:
          amari.append(tmp%k)
      else:
          break
  amari = amari * ((k//len(amari)) +1)

  ans = amari[0]
  for i in range(1, k+1):
      ans += amari[i]
      if ans % k == 0:
          print(i+1)
          break
  else:
    print(-1)
s=input()
t=input()
a=0
for i in range(3):
  if s[i]==s[t]:
    a+=1
print(a)

### FIXED CODE ###

s=input()
t=input()
a=0
for i in range(3):
  if s[i]==t[i]:
    a+=1
print(a)
input()
s=[int(i) for i in input().split]
print(min(s),max(s),sum(s))

### FIXED CODE ###

input()
s=[int(i) for i in input().split()]
print(min(s),max(s),sum(s))
def main():
    N, K, S = map(int, input().split())
    INF = 10 ** 10
    A = [INF] * N
    S = (S + 1) // 2
    for i in range(K + 1):
        if i % 2 == 0:
            A[i] = S
        else:
            A[i] = S - 1
    print(" ".join(map(str, A)))


if __name__ == "__main__":
    main()

### FIXED CODE ###

def main():
    N, K, S = map(int, input().split())
    MaxN = 10 ** 9
    if S == MaxN:
        A = [S] * K + [1] * (N - K)
    else:
        A = [S] * K + [S + 1] * (N - K)

    print(" ".join(map(str, A)))


if __name__ == "__main__":
    main()
s = input()

while s:
  if len(s) > 6 and s[0:7] == 'dreamer':
    s = s[7:]
    if s != [] and s[0] == 'a':
      s = 'er' + s
    continue
  elif len(s)>5 and s[0:6] == 'eraser':
    s = s[6:]
    continue
  elif len(s) > 4 and s[0:5] in ('dream', 'erase'):
    s = s[5:]
    continue
  else:
    print('NO')
    exit(0)
print('YES')

### FIXED CODE ###

s = input()
dp = [0 for i in range(len(s)+1)]
dp[0] = 1
words = ['eraser', 'erase', 'dreamer', 'dream']

for i in range(len(s)):
  i += 1
  for sent in words:
    before = i - len(sent)
    if before < 0:
      continue
    if dp[before] == 1 and s[before:i] == sent:
      dp[i] = 1
print('YES' if dp[-1] else 'NO')
#132 12:55
n,k=map(int,input().split())
mod=7+10**9
def C(i,j):
    def a(n):
        b=1
        if n==0:
            return 1
        else:
            for x in range(1,n+1):
                b=b*x
            return b
    return int(a(i)/(a(j)*a(i-j)))

answer=[]
for i in range(1,k+1):
    if n-k-i+1<0:
        answer.append(0)
    else:
        answer.append( (C(k-1,i-1)%mod)*(C(n-k+1,i)%mod ))
for i in range(k):
    print(answer[i]%mod)


### FIXED CODE ###

N, K = map(int, input().split())
R = N-K
RR = R-1
mod = 10**9+7

def nCr(n,r):
    K = 1
    for j in range(1,r+1):
        K = K*(n+1-j)//j
    return K

    
for i in range(K):
    ans = (nCr(K-1,i)%mod)*(nCr(N-K+1,i+1)%mod)
    ans = ans%mod
    print(ans)
(a,b)=list(map(int, input().split()))
print(''.join([c if i!=b-1 else c.lower() for i,c in enumerate(s:=input())]))

### FIXED CODE ###

(a,b)=list(map(int, input().split()))
s=input()
print(''.join([c if i!=b-1 else c.lower() for i,c in enumerate(s)]))
print( (int(input())-int(input())) % input())

### FIXED CODE ###

print( (int(input())-int(input())) % int(input()))
n = input()
if 'n' in 'aiueo'
    print('vowel')
else:
    print('consonant')


### FIXED CODE ###

n = input()
if n in 'aiueo':
    print('vowel')
else:
    print('consonant')
n,c=map(int,input().split())
x=[0]
v=[]
for i in range(n):
    a,b=map(int,input().split())
    x.append(a)
    v.append(b)

x1=[x[i+1]-x[i] for i in range(len(x)-1)]
x2=[c-x[-1]]+x1[:0:-1]
print(x1,x2)
h=[0]
t=[0]
for i,j in zip(x2,reversed(v)):
    h.append(h[-1]+j+-i)
hm=[max(h[:-i]) for i in range(1,len(h))]+[0]
print(h,hm)
m=0
for k,(i,j) in enumerate(zip(x1,v)):
    t.append(t[-1]+j-i)
    print(m,t[-1],i)
    m=max(m,t[-1]+hm[k])
print(m)

### FIXED CODE ###

a,b,c,x,y=map(int, input().split())

if x>=y :l=min(x,y)*2*c+(x-y)*a
else: l=l=min(x,y)*2*c+(y-x)*b

print(min(a*x+b*y, l, max(x,y)*2*c))
H, W, K = map(int, input().split())
C = [ input() for i in range(H)]
ans = 0
for i in range(1 << H):
    for j in range(1 << W):
        cnt = 0
        for m in range(H):
            for n in range(W):
                if ((i >> m) & 1): 
                    continue
                if ((j >> n) & 1): 
                    continue
                if C[m][n] == '#':
                    cnt += 1
        if cnt == K: 
            ans += 1
        elif cnt != K:
print(ans)


### FIXED CODE ###

H, W, K = map(int, input().split())
C = [ input() for i in range(H)]
ans = 0
for i in range(1 << H):
    for j in range(1 << W):
        cnt = 0
        for m in range(H):
            for n in range(W):
                if ((i >> m) & 1): 
                    continue
                if ((j >> n) & 1): 
                    continue
                if C[m][n] == '#':
                    cnt += 1
        if cnt == K: 
            ans += 1
        
print(ans)
N = int(input())
if N == 2:
  A,B = map(int, input().split())
  print(A + B)
else:
  print("Hello World")

### FIXED CODE ###

N = int(input())
if N == 2:
  A = int(input())
  B = int(input())
  print(A + B)
else:
  print("Hello World")
N, Q = map(int, input().split())
connections = [[] for _ in range(N + 1)]
for _ in range(N - 1):
    a, b = map(int, input().split())
    connections[a].append(b)
    connections[b].append(a)
###

### Scoreの初期化( 今書くなら[0]*N+1 でよい)
scores = [0 for _ in range(N + 1)]
### それへのScore代入
for _ in range(Q):
    tag, p = map(int, input().split())
    scores[tag] += p
###


# k -> 訪問先 bef -> 前回の訪問先
def dfs(k=1,bef=-1):
    global scores
    global fins
    kids = connections[k]
    # グラフの端っこかつ唯一の接続先が前回の訪問先なら終了
    if len(kids)==1 and bef==kids[0]:
        return
    for kid in kids:
        # print(f'k:{k} kids:{kids}')
        if bef==kid:
            continue
        scores[kid]+=scores[k]
        dfs(kid,k)


dfs()



print(*scores[1:])

### FIXED CODE ###

import sys
sys.setrecursionlimit(10 ** 6)
def input():
    return sys.stdin.readline()[:-1]
N , Q = map(int,input().split())
graph = [[] for _ in range(N)]
point = [0] * N
for _ in range(N - 1):
    a , b = map(int,input().split())
    graph[a - 1].append(b - 1)
    graph[b - 1].append(a - 1)

for _ in range(Q):
    a , b = map(int,input().split())
    a = a - 1
    point[a] += b

def dfs(now , prev = -1):
    for next in graph[now]:
        if next == prev:
            continue
        point[next] += point[now]
        dfs(next , now)

dfs(0)
print(*point)
import math as m

n = int(input())
q = int(m.sqrt(n))

for i in range(q,1,-1):
    if n%i == 0:
        k = i
        l = n/i
        break

print(int(k+l-2))



### FIXED CODE ###

import math as m

n = int(input())
q = int(m.sqrt(n))

for i in range(q,0,-1):
    if n%i == 0:
        k = i
        l = int(n/i)
        break

print(int(k+l-2))
#include <bits/stdc++.h>
using namespace std;
void print() {
    cout << endl;
}
template <class Head, class... Tail>
void print(Head &&head, Tail &&... tail) {
    cout << head;
    if (sizeof...(tail) != 0)
        cout << " ";
    print(forward<Tail>(tail)...);
}
template <class T>
void print(vector<T> &vec) {
    for (auto &a : vec) {
        cout << a;
        if (&a != &vec.back())
            cout << " ";
    }
    cout << endl;
}
template <class T>
void print(vector<vector<T>> &df) {
    for (auto &vec : df) {
        print(vec);
    }
}
#define rep(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i)
#define xrep(i, a, b) for (int i = int(a); i < int(b); ++i)
using ll = long long;
const int INF = 100100100;

vector<vector<int>> A(3);

bool bingo(vector<int> B) {
    int cnt1 = 0;
    for(int b: B) {
        rep(y, 3) {
            rep(x, 3) {
                if(A[y][x]==b) {
                    ++cnt1;
                }
            }
        }
    }
    if(cnt1==3) return true;
    int cnt2 = 0;
    for(int b: B) {
        rep(y, 3) {
            rep(x, 3) {
                if(A[x][y]==b) {
                    ++cnt2;
                }
            }
        }
    }
    if(cnt2==3) return true;
    int cnt3 = 0;
    for(int b: B) {
        rep(i, 3) {
            if(b==A[i][i]) ++cnt3;
        }
    }
    if(cnt3==3) {
        return true;
    }

    int cnt4 = 0;
    for(int b: B) {
        rep(i, 3) {
            if(b==A[2-i][i]) ++cnt4;
        }
    }
    if(cnt4==3) {
        return true;
    }
    return false; 
}

int main() {
    vector<int> row(3);
    rep(i, 3) {
        rep(j, 3) {
            cin >> row[j];
        }
        A[i] = row;
    }
    int N;
    cin >> N;
    vector<int> B(N);
    rep(i, N) {
        cin >> B[i];
    }

    bool flag = bingo(B);

    if(flag) {
        print("Yes");
    }
    else {
        print("No");
    }



    return 0;
}

### FIXED CODE ###

if __name__ == '__main__':
    A = []
    for i in range(3):
        row = list(map(int, input().split()))
        A.append(row)
    
    N = int(input())
    B = []

    for i in range(N):
        B.append(int(input())) 
    
    for i in range(3):
        cnt = 0
        for j in range(3):
            if A[i][j] in B:
                cnt += 1
        if cnt==3:
            print('Yes')
            quit()
            
    for i in range(3):
        cnt = 0
        for j in range(3):
            if A[j][i] in B:
                cnt += 1
        if cnt==3:
            print('Yes')
            quit()

    if A[0][0] in B and A[1][1] in B and A[2][2] in B:
        print('Yes')
        quit()
    
    if A[0][2] in B and A[1][1] in B and A[2][0] in B:
        print('Yes')
        quit()
    
    print('No')
import sys, math, itertools, collections, bisect
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8')
inf = float('inf') ;mod = 10**9+7
mans = inf ;ans = 0 ;count = 0 ;pro = 1

h,w,m = map(int,input().split())
grid = [[0] * w for i in range(h)]
# print(*grid,sep= "\n")
for _ in range(m):
  i,j = map(int,input().split())
  i-=1
  j-=1
  grid[i][j] += 1
tate = [0] * w
yoko = [0] * h
for i in range(h):
  yoko[i] = sum(grid[i])
for j in range(w):
  tmp = 0
  for i in range(h):
    tmp += grid[i][j]
  tate[j] = tmp
for i in range(h):
  for j in range(w):
    ans = max(ans,yoko[i] + tate[j]-grid[i][j])
print(ans)
# print(tate)
# print(yoko)

### FIXED CODE ###

import sys, math, itertools, collections, bisect
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8')
inf = float('inf') ;mod = 10**9+7
mans = inf ;ans = 0 ;count = 0 ;pro = 1

h,w,m = map(int,input().split())
yoko = [0] * h
tate = [0] * w
S = set()
for _ in range(m):
  i,j = map(int,input().split())
  i-=1
  j-=1
  yoko[i] += 1
  tate[j] += 1
  S.add((i,j))
MY = max(yoko)
MT = max(tate)
max_yokos = []
max_tates = []
for i in range(h):
  if yoko[i] == MY:
    max_yokos.append(i)
for j in range(w):
  if tate[j] == MT:
    max_tates.append(j)
lmy = len(max_yokos)
lmt = len(max_tates)
for i in max_yokos:
  for j in max_tates:
    if not (i,j) in S:
      print(MY + MT)
      exit()
print(MY + MT - 1)


# print(tate)
# print(yoko)
s = input()
mins = 1000
for i in renge(len(s)-2):
  mins = min(mins,abs(753-((int(s[i])+int(s[i+1])+int(s[i+2])))
print(mins)

### FIXED CODE ###

s = str(input())
mins = 1000
for i in range(len(s)-2):
    mins = min(mins,abs(753-(int(s[i:i+3]))))
print(mins)
a,b = list(map(int,input().split()))
d = int(a / b)
r = int(a % b)
f = float(a / b)
print("{0:d} {1:d} {2:d}".format( d, r, f))

### FIXED CODE ###

a,b = list(map(int,input().split()))
d = int(a / b)
r = int(a % b)
f = float(a / b)
print("{0:d} {1:d} {2:f}".format( d, r, f))
N = input()
def DFS(s, mx):
    if len(s) == N:
        print(s)
        return
    c = 'a'
    while c <= chr(ord(mx)+1):
        t = s + c
        DFS(t, chr(max(ord(c), ord(mx))))
        c = chr(ord(c) + 1)
DFS("", chr(ord('a')-1))


### FIXED CODE ###

N = int(input())
def DFS(s, mx):
    if len(s) == N:
        print(s)
        return
    c = 'a'
    while c <= chr(ord(mx)+1):
        t = s + c
        DFS(t, chr(max(ord(c), ord(mx))))
        c = chr(ord(c) + 1)
DFS("", chr(ord('a')-1))
a ,b= map(int,input().split())
aaa = [list(map(int,input().split())) for i in range(b*2)]
 
s = {i for i in range(1,a+1)}

if a == 0:
    print(0)
    exit

if b == 0:
    print(len(aaa))
    exit
    

for i in range(1,a+1,2):
    for k in aaa[i]:
        s.discard(k)
 
print(len(s))

### FIXED CODE ###

a,b = map(int,input().split())
aaa = [list(map(int,input().split())) for i in range(b*2)]

c = set()
e = set()
for i in range(1,len(aaa),2):
  for k in aaa[i]:
     c.add(k)
    
print(a - len(c))
n = int(input())
a = [list(input()) for i range(n)]
cnt = 0
cnt_A=0
cnt_B=0
cnt_C=0
for i in range(n):
  if "AB" in a[i]:
    cnt+= 1
for i in range(n):
  if a[i][-1] == "A" 
    cnt_A +=1
  elif a[i][0] =="B":
    cnt_B+=1
  elif a[i][-1] == "A" and a[i][0] =="B":
    cnt_C+=1
print(cnt+cnt_A+cnt_B-cnt_C)

### FIXED CODE ###

n=int(input())
ans=0
a=0;b=0;ab=0
for i in range(n):
  s=input()
  ans+=s.count("AB")
  if s[0]=="B":
    b+=1
    if s[-1]=="A":
      ab+=1
      b-=1
  elif s[-1]=="A":
    a+=1
if a+b==0:
    print(ans+max(ab-1,0))
else:
    print(ans+min(a,b)+ab)
import math

N = int(input())
A = []
B = []
F = []
for i in range(1,N):
    if (N%i)== 0:
        A.append(N/i)
        B.append(i)
for i in range(len(A)):
    count_A = int(math.log10(A[i])+1)
    count_B = int(math.log10(B[i])+1)
    if count_A >= count_B:
        F.append(count_A)
    else:
        F.append(count_B)
print(min(F))


### FIXED CODE ###

import math

N = int(input())
A = []
B = []
F = []

for i in range(1,int(math.sqrt(N))+1,1):
    if (N%i)== 0:
        A.append(N/i)
        B.append(i)
for i in range(len(A)):
    count_A = int(math.log10(A[i])+1)
    count_B = int(math.log10(B[i])+1)
    if count_A >= count_B:
        F.append(count_A)
    else:
        F.append(count_B)
print(min(F))
n = int(input())

for d in range(1, n):
    if n <= 26 ** d:
        break
    n -= 26 ** d

n -= 1
out = ""
for i in range(d - 1, -1, -1):
    out += chr(ord('a') + n // (26 ** i))
    n %= 26 ** i
print(out)

### FIXED CODE ###

n = int(input())

out = ""
while n > 0:
    n -= 1
    out += chr(ord('a') + n % 26)
    n //= 26

print(out[::-1])
import fraction
from functools import reduce

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

def lcm_base(x, y):
    return (x * y) // fraction.gcd(x, y)

def lcm(*numbers):
    return reduce(lcm_base, numbers, 1)

def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)

x = lcm_list(a)
ans = 0

for i in a:
    ans += (x//i)
    ans %= 1000000007

print(ans)

### FIXED CODE ###

import fractions
from functools import reduce

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

def lcm_base(x, y):
    return (x * y) // fractions.gcd(x, y)

def lcm(*numbers):
    return reduce(lcm_base, numbers, 1)

def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)

x = lcm_list(a)
ans = 0

for i in a:
    ans += (x//i)
ans %= 1000000007

print(ans)
#! -*- coding:utf-8 -*-

def search(values,hp,vp,fruit):
    if not (0<=hp<len(values)): return
    if not (0<=vp<len(values[hp])): return
    if fruit!=values[hp][vp]: return
    values[hp][vp]=0
    search(values,hp-1,vp,fruit)
    search(values,hp+1,vp,fruit)
    search(values,hp,vp-1,fruit)
    search(values,hp,vp+1,fruit)

def solve(values):
    count=0
    for i in range(len(values)):
        for j in range(len(values[i])):
            if values[i][j] in ['@','#','*']:
                search(values,i,j,values[i][j])
                count+=1
    return count

def main():
    line,values=input(),list()
    while line!='0 0':
        H,W = list(map(int,line.split(' ')))
        value = list()
        for _ in range(H):
            value.append([x for x in input().strip()])
        values.append(value)
        line = input()
    for value in values:
        print(solve(value))

if __name__=='__main__':
    main()

### FIXED CODE ###

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

import sys
sys.setrecursionlimit(10**6)

def search(field,hp,vp,item):
	if not (0<=hp<len(field)): return
	if not (0<=vp<len(field[hp])): return
	if item!=field[hp][vp]: return
	field[hp][vp]=True
	for dh,dv in [[0,1],[0,-1],[1,0],[-1,0]]:
		search(field,hp+dh,vp+dv,item)
#	search(field,hp-1,vp,item)
#	search(field,hp+1,vp,item)
#	search(field,hp,vp-1,item)
#	search(field,hp,vp+1,item)

def solve(field):
	count,valid_items=0,set(['@','#','*'])
	for i in range(len(field)):
		for j in range(len(field[i])):
			if field[i][j] in valid_items:
				search(field,i,j,field[i][j])
				count+=1
	return count

def main():
	line = input().strip()
	while line!='0 0':
		H,W = list(map(int,line.split(' ')))
		field = list()
		for _ in range(H):
			field.append(list(input().strip()))
		print(solve(field))
		line = input().strip()

if __name__=='__main__':
	main()
N, M, D = map(int, input().split())

if D == 0:
    print(1/N*(M-1))
else:
    print(2(N-D)/N**2*(M-1))


### FIXED CODE ###

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

if D == 0:
    print(1/N*(M-1))
else:
    print(2*(N-D)/N**2*(M-1))
S=input()
n=0
if len(S)%2==0:
    for i in range (0,int(len(S))/2):
        if S[i]!=S[-i-1]:
            n+=1
else:
    for i in range (0,int(((len(S))+1)/2)):
        if S[i]!=S[-i-1]:
            n+=1
print(n)

### FIXED CODE ###

S=input()
n=0
if len(S)%2==0:
    for i in range (0,int((len(S))/2)):
        if S[i]!=S[-i-1]:
            n+=1
else:
    for i in range (0,int(((len(S))+1)/2)):
        if S[i]!=S[-i-1]:
            n+=1
print(n)
N,X=map(int,input().split())
x=list(map(int,input().split()))+[X]

from fractions import gcd

x=[x[i+1]-x[i] for i in range(N)]

def gcd_many(_list):
    if len(_list)==1:
        return abs(_list[0])
    elif len(_list)==2:
        return gcd(_list[0],_list[1])
    else:
        return gcd(_list[0],gcd_many(_list[1:]))
        
print(abs(gcd_many(x)))

### FIXED CODE ###

N,X=map(int,input().split())
x=list(map(int,input().split()))+[X]

from fractions import gcd

x=[x[i+1]-x[i] for i in range(N)]

ans=0
for i in range(N):
    ans=gcd(ans,x[i])
print(abs(ans))
n=int(input())

a=list(map(int,input().split()))
  
b=[]
if n>1:
  for j in range (n-1):
    c=a[j]-a[j+1]
    if c>-1:
      b.append(c)
      a[j+1]=a[j+1]+c
      
   
  if max(b)>-1:
    print(sum(b))
  else:
    print(0)
    
else:
  print(0)


### FIXED CODE ###

n=int(input())

a=list(map(int,input().split()))
  
b=[]
if n>1:
  for j in range (n-1):
    c=a[j]-a[j+1]
    if c>-1:
      b.append(c)
      a[j+1]=a[j+1]+c
    else:
      b.append(0)
      
   
  if max(b)>-1:
    print(sum(b))
  else:
    print(0)
    
else:
  print(0)
x = input('')
print (x*x*x)

### FIXED CODE ###

x = int(input(''))
print(x*x*x)
import math
from functools import reduce
import sys

def gcd(number_list):
    return reduce(math.gcd, number_list)

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

print(Numbers)

if len(Numbers) == 2:
    print(int(max(Numbers)))
    sys.exit()
else:
    gcd_list = []
    for i in range(N):
        tmp_list = Numbers[:i] + Numbers[i + 1:]
        gcd_list.append(gcd(tmp_list))
    print(int(max(gcd_list)))


### FIXED CODE ###

from functools import reduce
from itertools import combinations
from fractions import gcd

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


Left = [0] * (N + 1)
Right = [0] * (N + 1)

for i in range(N):
    Left[i + 1] = gcd(Left[i], A[i])
    Right[N - i - 1] = gcd(Right[N - i], A[N - i - 1])
ans = 0
for i in range(N):
    ans = max(ans, gcd(Left[i], Right[i + 1]))
    
print(ans)
n = int(input())
for i in range(n):
  x1, y1, x2, y2, x3, y3, x4, y4 = [float(j) for j in input().split()]
  if x2 - x1 == 0:
    if x4 - x3 == 0:
      print("YES")
    else:
      print("NO")
  print("YES" if (y2 - y1) / (x2 - x1) == (y4 - y3) / (x4 - x3) else "NO")

### FIXED CODE ###

n = int(input())
for i in range(n):
  x1, y1, x2, y2, x3, y3, x4, y4 = [float(j) * 10**10 for j in input().split()]
  if x2 == x1:
    if x4 == x3:
      print("YES")
    else:
      print("NO")
  elif x4 == x3:
    print("NO")
  else:
    print("YES" if (y2 - y1) / (x2 - x1) == (y4 - y3) / (x4 - x3) else "NO")
N,R=map(int,input().split())
if N>=10:
  print('R')
else:
  print('{}'.format(R+100*(10-K)))

### FIXED CODE ###

N,R=map(int,input().split())
if N>=10:
  print(R)
else:
  print(R+100*(10-N))
a = 1
while True:
  read each x=raw_input()
  if x=0:
   print(0)
   break

### FIXED CODE ###

count = 0
while True:
    x=raw_input()
    count += 1
    if x == '0':
      break
    print('Case ' + str(count) + ': ' + x)
a, b = map(int, input().solit())

print(max(a+b, a-b, a*b))

### FIXED CODE ###

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

print(max(a+b, a-b, a*b))
import sys


for line in sys.stdin:
    xa1, ya1, xa2, ya2, xb1, yb1, xb2, yb2 = map(float, line.split(' '))
    if (xa1 <= xb1 and xb1 <= xa2 or xb1 <= xa1 and xa1 <= xb2) and (yb1 <= ya2 and ya2 <= yb2 or ya1 <= yb2 and yb2 <= ya2):
        print 'YES'
    else:
        print 'NO'

### FIXED CODE ###


import sys


for line in sys.stdin:
    xa1, ya1, xa2, ya2, xb1, yb1, xb2, yb2 = map(float, line.strip().split(' '))
    if ((xb1<=xa1 and xa1<=xb2) or (xa1<=xb1 and xb1<=xa2)) and ((yb1<=ya2 and ya2<=yb2) or (ya1<=yb2 and yb2<=ya2)):
        print 'YES'
    else:
        print 'NO'
k,t = map(int,input().split())
A = list(map(int,input().split()))
at = max(A)
print(max(2*at−1−k,0))


### FIXED CODE ###

k, t = map(int, input().split())
a = list(map(int, input().split()))
print(max(2*max(a)-k-1, 0))
while 1:
    x, y = map(int, raw_input().split())
    if x == 0 and y == 0:
        break
    if y < x:
        print '%s %s' %(y, x)
    else:
        print '%s %s' %(x, y)
    

### FIXED CODE ###

while 1:
   x, y = map(int, raw_input().split())
   if x == 0 and y == 0:
      break
   elif x > y:
      print '%s %s' % (y,x)
   else:
      print '%s %s' % (x,y)
a=int(input())
b=int(input())
c=int(input())
print(min(b//a,c))


### FIXED CODE ###

a,b,c=map(int,input().split())
print(min(b//a,c))
import sys
import math

sys.setrecursionlimit(10 ** 6)
INF = float("inf")
MOD = 10 ** 9 + 7


def input():
    return sys.stdin.readline().strip()


def main():
    N = int(input())
    A = list(map(int, input().split()))
    # i番目から左の全ての要素のGCD
    gcd_from_left = [None] * N
    gcd_from_left[0] = A[0]
    # i番目から右の全ての要素のGCD
    gcd_from_right = [None] * N
    gcd_from_right[-1] = A[-1]

    for i in range(1, N):
        gcd_from_left[i] = math.gcd(A[i], gcd_from_left[i - 1])

    for i in range(N - 2, -1, -1):
        gcd_from_right[i] = math.gcd(A[i], gcd_from_right[i + 1])

    gcd_from_right.sort()

    # 要素iを取り除いたときの最大公約数
    ans = max(gcd_from_left[-2], gcd_from_right[1])
    for i in range(1, N - 1):
        tmp = math.gcd(gcd_from_right[i + 1], gcd_from_left[i - 1])
        if tmp > ans:
            ans = tmp

    print(ans)


if __name__ == "__main__":
    main()


### FIXED CODE ###

import sys
from fractions import gcd


sys.setrecursionlimit(10 ** 6)
INF = float("inf")
MOD = 10 ** 9 + 7


def input():
    return sys.stdin.readline().strip()


def main():
    N = int(input())
    A = list(map(int, input().split()))
    # i番目から左の全ての要素のGCD
    gcd_from_left = [None] * N
    gcd_from_left[0] = A[0]
    # i番目から右の全ての要素のGCD
    gcd_from_right = [None] * N
    gcd_from_right[-1] = A[-1]

    for i in range(1, N):
        gcd_from_left[i] = gcd(A[i], gcd_from_left[i - 1])

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

    gcd_from_right.sort()

    # 要素iを取り除いたときの最大公約数
    ans = max(gcd_from_left[-2], gcd_from_right[1])
    for i in range(1, N - 1):
        tmp = gcd(gcd_from_right[i + 1], gcd_from_left[i - 1])
        if tmp > ans:
            ans = tmp

    print(ans)


if __name__ == "__main__":
    main()
N = int(input())
d = list(map(int, input().split()))
d_sort = sorted(d)
print(d_sort[N/2] - d_sort[N/2 - 1])


### FIXED CODE ###

N = int(input())
d = list(map(int, input().split()))
d_sort = sorted(d)
print(d_sort[N//2] - d_sort[N//2 - 1])