Harryxun/stf_run huggingface dataset:
from itertools import accumulate
import math
import fractions

N = int(input())
A = [int(i) for i in input().split()]

#最大公約数で累積和作る
B = [0] * N
R = [0] * N
for i in range(N):
    B[i+1] = (math.gcd(B[i],A[i]))
    #逆向き,とったやつの反対端用   
    R[N-i -1] = (math.gcd(R[N-i], A[N-i -1]))
 
ans = 0
for i in range(N):
    ans = max(ans, math.gcd(B[i], R[i+1]))
print(ans)


### FIXED CODE ###

from itertools import accumulate
import math
import fractions

N = int(input())
A = [int(i) for i in input().split()]

#最大公約数で累積和作る
B = [0] * (N+1)
R = [0] * (N+1)
for i in range(N):
    B[i+1] = (fractions.gcd(B[i],A[i]))
    #逆向き,とったやつの反対端用   
    R[N-i -1] = (fractions.gcd(R[N-i], A[N-1 -i]))
 
ans = 0
for i in range(N):
    ans = max(ans, fractions.gcd(B[i], R[i+1]))
print(ans)
a = input()
print('A') if c.isupper() is True else print('a')

### FIXED CODE ###

a = input()
print('A') if a.isupper() is True else print('a')
import numpy as np

n, k = map(int, input().split())
a = np.sort(np.array(input().split(), dtype=np.int))
f = np.sort(np.array(input().split(), dtype=np.int))
time = f * a[::-1]

sup = time.max()
inf = 0
while sup > inf:
  x = (sup + inf) // 2
  train = ((time[time > x] - x + f - 1) // f).sum()
  if k < train:
    inf = x + 1
  else:
    sup = x
print(sup)

### FIXED CODE ###

import numpy as np

n, k = map(int, input().split())
a = np.sort(np.array(input().split(), dtype=np.int))
f = np.sort(np.array(input().split(), dtype=np.int))
time = f * a[::-1]

sup = time.max()
inf = 0
while sup > inf:
  x = (sup + inf) // 2
  train = ((np.maximum(time - x, 0) + f - 1) // f).sum()
  if k < train:
    inf = x + 1
  else:
    sup = x
print(sup)
INF = 1*((10**9)*5000 + 1)
n, k = map(int, input().split())
P = [*map(lambda x: int(x)-1, input().split())]
C = [*map(int, input().split())]

# print(n,k)
# print(P)
# print(C,end='\n\n')

vis = [False]*(n+1)
def dfs(i, c, sum_c=0):
    if vis[i]: return c, sum_c
    vis[i] = True
    c.append(C[i])
    sum_c += C[i]
    ret = dfs(P[i], c, sum_c)
    # vis[i] = False
    return ret

lst_costs = []
for i in range(n):
    costs, lp_c = dfs(i, [])
    if len(costs) == 0: continue
    lst_costs.append((costs,lp_c))

# print(*lst_costs,sep='\n',end='\n\n')

score = -INF
for costs, lp_c in lst_costs:
    # print(costs, lp_c)
    cnt, remain = divmod(k, len(costs))
    len_c = len(costs)
    for st in range(len_c):
        cost = -INF
        if lp_c <= 0:
            max_c = -INF
            sum_c = 0
            for d in range(len_c):
                i = (st + d) % len_c
                x = costs[i]
                # print(st,d,i,x)
                sum_c += x
                max_c = max(max_c, sum_c)
            cost = max_c
            # print('1. cost',cost)
        else: # lp_c > 0:
            if cnt == 0:
                max_c = -INF
                sum_c = 0
                for d in range(len_c):
                    i = (st + d) % len_c
                    x = costs[i]
                    sum_c += x
                    max_c = max(max_c, sum_c)
                cost = max_c
                # print('2. cost',cost)

            else: # cnt > 0
                cost = lp_c * (cnt-1)
                max_c = -INF
                sum_c = 0
                # for d in range(remain):
                for d in range(len_c+remain):
                    i = (st + d) % len_c
                    x = costs[i]
                    sum_c += x
                    max_c = max(max_c, sum_c)
                cost = max_c + cost
                # print('3. cost',cost)

        score = max({score, cost})
print(score)



### FIXED CODE ###

n, k = map(int, input().split())
P = [*map(lambda x: int(x)-1, input().split())]
C = [*map(int, input().split())]

INF = 10**18
max_score = -INF
for st in range(n):
    lc = 0 # lap count
    lap_sc = 0 # lap score
    nx = st
    while True:
        lc += 1
        lap_sc += C[nx]
        nx = P[nx]
        if nx == st: break

    sum_sc = 0
    kc = 0
    while True:
        kc += 1
        if k < kc: break

        sum_sc += C[nx]
        score = sum_sc + max(0, lap_sc) * ((k - kc) // lc)
        max_score = max(max_score, score)

        nx = P[nx]
        if nx == st: break

print(max_score)

# print('===')
# print(n,k)
# print(P)
# print(C,end='\n\n')
n,m,k = map(int, input().split())

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

cnt = 0
n_a = 0
n_b = 0

while True:
    if n_a < n and n_b < m:
        if a[n_a] < b[n_b]:
            k = k-a[n_a]
            if k >= 0:
                n_a = n_a + 1
                cnt = cnt + 1
            else:
                print(cnt)
                exit()
        else:
            k = k - b[n_b]
            if k >= 0:
                n_b = n_b + 1
                cnt = cnt + 1
            else:
                print(cnt)
                exit()
    elif n_a < n:
        k = k - a[n_b]
        if k >= 0:
            n_a = n_a + 1
            cnt = cnt + 1
        else:
            print(cnt)
            exit()
    elif n_b < m:
        k = k - b[n_b]
        if k >= 0:
            n_b = n_b + 1
            cnt = cnt + 1
        else:
            print(cnt)
            exit()
    else:
        print(cnt)
        exit()
       

    


### FIXED CODE ###

n,m,k = map(int, input().split())

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

aa = [0]
bb = [0]

for i in range(n):
    aa.append(a[i] + aa[i])

for i in range(m):
    bb.append(b[i] + bb[i])

ans = 0
mstart = m
for i in range(n+1):
    if k - aa[i] < 0:
        break
    for j in range(mstart,-1,-1):
        if k - aa[i] - bb[j] >= 0:
            mstart = j
            break
    if ans < i + j :
        ans = i + j 

print(ans)
r, g, b = map(int,input().split())
total = r*100 + g*10 + b
if total % 4 == 0:
	print(YES)
else:
	print(NO)

### FIXED CODE ###

r, g, b = map(int,input().split())
total = r*100 + g*10 + b
if total % 4 == 0:
	print('YES')
else:
	print('NO')
N, K = map(int, input().split())
N = abs(N - K)
while true:
  if N =< K:
    N = (N - K)
    break
    
print(abs(N))

### FIXED CODE ###

n, k = map(int, input().split())
if n==0 or k==1:
    print(0)
    exit()
elif n<k:
    print(min(n, abs(n-k)))
    exit()
elif n % k == 0:
    print(0)
    exit()
else:
    mx = n%k
print(min(abs(mx-k), mx))
data = [int(input()) for i in range(5)]
K = input()
print(":(" if data[4]-data[0]>K else "Yay!" )

### FIXED CODE ###

data = [int(input()) for i in range(5)]
K = int(input())
print(":(" if data[4]-data[0]>K else "Yay!" )
x,a,b=map(int,input(' '))
print('A') if abs(x-a)<abs(x-b) else print('B')

### FIXED CODE ###

x,a,b=map(int,input().split(' '))
print('A') if abs(x-a)<abs(x-b) else print('B')
N = int(input())
k = 0:
  for i in range(9):
    for j in range(9):
      if (i+1)*(j+1) == N:
        k += 1
if k ==0:
  print('No')
else:
  print('Yes')

### FIXED CODE ###

N = int(input())
k = 0
for i in range(9):
  for j in range(9):
    if (i+1)*(j+1) == N:
      k += 1
if k ==0:
  print('No')
else:
  print('Yes')
n, m, x = map(int, input().split())
c = [0] * (n + 1)
for i in (map(int, input().split())):
  c[i] = 1
print(min(sum(c[0:x], c[x:-1])))


### FIXED CODE ###

n, m, x = map(int, input().split())
c = [0] * (n + 1)
for i in (map(int, input().split())):
  c[i] = 1
print(min(sum(c[0:x]), sum(c[x:-1])))
# -*- coding: utf-8 -*-
def solve():
    wdict = {(True, True):('R',-1,-1), (True, False):('U',-1,1), (False, False):('L',1,1), (False, True):('D',1,-1)}
    mode = None
    for _ in [None]*int(input()):
        x, y = map(int, input().split())
        u = x+y
        if mode is None:
            mode = 1-u%2
            res = str(31+mode) + '\n' + ' '.join(map(str, [1]*mode+list(map((2).__pow__, range(31)[::-1]))))
            W0 = '\n'+'R'*mode
        elif mode != 1-u%2:
            return('-1')
        res += W0
        u -= mode
        v = x-y-mode
        for d in D:
            w, a, b = wdict[u>0, v>0]
            res += w
            u += a*d
            v += b*d
    return str(res)

if __name__ == '__main__':
    print(solve())

### FIXED CODE ###

# -*- coding: utf-8 -*-
def solve():
    N = int(input())
    Z = [tuple(map(int, input().split())) for _ in [None]*N]
    p = set(z%2 for z in map(sum,Z))
    if len(p) == 2:
        res = '-1'
    else:
        res = ''
        mode, *_ = p
        mode = 1-mode
        D = [2**i for i in range(30,-1,-1)]
        res += str(31+mode)
        res += '\n' + ' '.join(str(d) for d in D+[1]*mode)
        wdict = {(True, True):('R', (1,0)), (True, False):('U', (0,1)), (False, False):('L',(-1,0)), (False, True):('D',(0,-1))}
        for x, y in Z:
            x -= mode
            W = '\n'
            for d in D:
                w, (a, b) = wdict[x+y>0, x-y>0]
                W += w
                x -= a*d
                y -= b*d
            W += 'R'*mode
            res += W
    return str(res)

if __name__ == '__main__':
    print(solve())
N,M=map(int,input().split())
d=[-1 for _ in range(N)]
for m in range(M):
  s,c=map(int,input().split())
  if d[s-1]==-1:
    d[s-1]=c
  elif d[s-1]!=c:
    print(-1)
    exit()

if N>1:
	if d[0]==0:
    print(-1)
    exit()
  elif d[0]==-1:
  	d[0]=1

A=0
for i in range(N):
  A=A*10+(d[i] if d[i]!=-1 else 0)

print(A)


### FIXED CODE ###

N,M=map(int,input().split())
d=[-1 for _ in range(N)]
for m in range(M):
  s,c=map(int,input().split())
  if d[s-1]==-1:
    d[s-1]=c
  elif d[s-1]!=c:
    print(-1)
    exit()

if N>1:
  if d[0]==0:
    print(-1)
    exit()
  elif d[0]==-1:
  	d[0]=1

A=0
for i in range(N):
  A=A*10+(d[i] if d[i]!=-1 else 0)

print(A)
N=int(input())
print(rount(N/2)-1)

### FIXED CODE ###

N=int(input())
c=-(-N//2)-1
print(c)
#dp[i][j]:S[i-x:i]==S[j-x:j]となる最大のx
import numpy as np
from numba import njit

def solve(N, S, dp):
    for i in range(N - 1):
        for j in range(i + 1, N):
            dp[i][j] = min(j - i, dp[i - 1][j - 1] + 1) if S[i] == S[j] else 0
    print(dp.max())

def main():
    N = int(input())
    S = np.array([ord(_) for _ in input()])
    dp = np.zeros((N + 1, N + 1), dtype=np.int)
    solve(N, S, dp)

def cc_export():
    from numba.pycc import CC
    cc = CC('my_module')
    cc.export('solve', '(i8[:],)')(solve)
    cc.compile()

if __name__ == '__main__':
    import sys
    if sys.argv[-1] == 'ONLINE_JUDGE':
        cc_export()
        exit(0)
    from my_module import solve
    main()


### FIXED CODE ###

import itertools
N = int(input())
S = input()
dp = [[0] * N for _ in range(N)]
ans = 0
for i, j in itertools.combinations(range(N), 2):
    if S[i] == S[j]:
        dp[i][j] = dp[i - 1][j - 1] + 1
    else:
        dp[i][j] = 0
    ans = max(ans, min(j - i, dp[i][j]))
print(ans)
from bisect import bisect_right
from itertools import combinations_with_replacement

n = int(input())
l = list(map(int, input().split()))
l.sort()

li = list(combinations_with_replacement(l, 2))
li = [x for x in li if x[0] != x[1] and x[1] != max(l)]

ans = 0
for small, mid in li:
    right = bisect_right(l, small + mid - 1)
    left = bisect_left(l, mid)
    ans += max(right - left - 1, 0)

print(ans)

### FIXED CODE ###

from bisect import bisect_left
import copy

n = int(input())
l = list(map(int, input().split()))
l.sort()


ans = 0
for small in range(n - 2):
    for mid in range(small + 1, n - 1):
        div = bisect_left(l, l[small] + l[mid], 0, n)
        if div > mid + 1:
            ans += div - mid - 1

print(ans)
N,K,X,Y=map(int,input().split(sep))
if N>K:
    print(K*X+(N-K)*Y)
else:
    print(N*X)

### FIXED CODE ###

N=int(input())
K=int(input())
X=int(input())
Y=int(input())
if N>K:
    print(K*X+(N-K)*Y)
else:
    print(N*X)
n=int(input().split())
l=list(map(int,input().split()))
cnt=0
for i in range(n-1):
  if (l[i] == i+1) and (l[i+1] == i+2):
    {l[i],l[i+1]}={l[i+1],l[i]}
    cnt+=1
print(cnt)


### FIXED CODE ###

n=int(input())
l=list(map(int,input().split()))
cnt=0
for i in range(n-1):
  if l[i] == i+1:
    l[i],l[i+1]=l[i+1],l[i]
    cnt+=1
if l[-1]==n:
  cnt+=1
print(cnt)
N, K = map(int, input().split())
x = list(map(int, input().split()))

count_m = 0
count_p = 0
for i in range(N):
    if x[i] > 0:
        count_m = i
        count_p = N-i
        break
    elif x[i] == 0:
        count_m = i
        count_p = N-i-1
        K -= 1
        N -= 1
        x.remove(x[i])
        break
if count_m == 0 and count_p == 0:
    count_m = N

ans = 0
    

y = K
z = K - y
for j in range(1, y):
    #if count_m-j>0 and count_m+y-1-j<N-1:
    if True:

        print(j)

        print(x[count_m+y-1-j],x[count_m-j] ,x[count_m-1])



if count_m >= 1 and N-K>0:

    tmp = min(x[count_m+y-1-j]-x[count_m-j] *2
              for j in range(1, y) if count_m-j>0  and count_m+y-1-j<N-1)
    tmp2 = min(x[count_m+y-1-j]*2-x[count_m-j]
               for j in range(1, y) if count_m-j>0 and count_m+y-1-j<N-1)
else:
    tmp = tmp2 = 1000000000

if N==0:
    ans = 0

elif count_p>=K:
    # print(y, "1chi")
    ans = min(tmp, tmp2, x[count_m+min(y, count_p)-1])
elif count_m>=K:
    #print("ni")
    ans = min(tmp, tmp2, -x[count_m-K])
else:
    # print("san")
    ans = min(tmp, tmp2)


print(ans)


### FIXED CODE ###

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

count_m = 0
count_p = 0
for i in range(N):
    if x[i] > 0:
        count_m = i
        count_p = N-i
        break
    elif x[i] == 0:
        count_m = i
        count_p = N-i-1
        K -= 1
        N -= 1
        x.remove(x[i])
        break
if count_m == 0 and count_p == 0:
    count_m = N

ans = 0
    

y = K
z = K - y


if count_m >= 1 and count_p>=1:
    # for j in (range(1,y)):
    #     if count_m-j>=0  and count_m+y-1-j<N:
    #         print(x[count_m+y-1-j], x[count_m-j])
    tmp = min(x[count_m+y-1-j]-x[count_m-j] *2 for j in range(1, y) if count_m-j>=0  and count_m+y-1-j<N)
    tmp2 = min(x[count_m+y-1-j]*2-x[count_m-j] for j in range(1, y) if count_m-j>=0 and count_m+y-1-j<N)
else:
    tmp = tmp2 = 1000000000

if N==0:
    ans = 0


elif count_p>=K:
    # print(y, "1chi")
    ans = min(tmp, tmp2, x[count_m+min(y, count_p)-1])
elif count_m>=K:
    #print("ni")
    ans = min(tmp, tmp2, -x[count_m-K])
else:
    #print("san", tmp, tmp2)
    ans = min(tmp, tmp2)


print(ans)
def test():
    n = int(input())
    a = list(map(int,input().split()))
    a.sort()
    print(a)
    b = []
    i = 0
    while i + 1 < n:
        if a[i] == a[i+1]:
            b.append(a[i])
            i += 2
        else:
            i += 1
    print(b[-1]*b[-2])



if __name__ == "__main__":
    test()


### FIXED CODE ###

def test():
    n = int(input())
    a = list(map(int,input().split()))
    a.sort()
    b = []
    i = 0
    while i + 1 < n:
        if a[i] == a[i+1]:
            b.append(a[i])
            i += 2
        else:
            i += 1
    print(b[-1]*b[-2] if len(b)>=2 else 0)


if __name__ == "__main__":
    test()
n,y=map(int,input().split( ))
 
flag=True
 n,y=map(int,input().split( ))
 
flag=True
 
for i in range(n+1):
    for j in range(n-i+1):
        x=y-10000*i-5000*j
        if x/1000 == n-i-j:
            flag = False
            print(str(i)+' '+str(j)+' '+str(n-i-j-2))
        break
    if not flag:
        break
 
 
if flag:
    print('-1 -1 -1')

### FIXED CODE ###


n,y=map(int,input().split( ))
 
flag=True

def fcn():
    for i in range(n+1):
        for j in range(n-i+1):
            if y==10000*i+5000*j+1000*(n-i-j):
                return [i,j,n-i-j]
    return [-1,-1,-1]

print(' '.join(list(map(str,fcn()))))
MOD = 10**9+7

s = int(input())
a = [0]*range(s+1)
a[0] = 1
for i in range(3, s+1):
    a[i] = sum(a[:i-2]) % MOD
print(a[s])


### FIXED CODE ###

MOD = 10**9+7

s = int(input())
a = [0 for i in range(s+1)]
a[0] = 1
for i in range(3, s+1):
    a[i] = sum(a[:i-2]) % MOD
print(a[s])
a, b, c, d = map(int, input().split())
for i in range(a, b + 1):
    for j in range(c, d + 1):
        print(max(i * j))

### FIXED CODE ###

a, b, c, d = map(int, input().split())
e = []
for i in [a, b]:
    for j in [c, d]:
        e += [i * j]

print(max(e))
class UnionFind():
    def __init__(self, n):
        self.n = n
        self.parents = [-1] * n

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

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

        if x == y:
            return

        if self.parents[x] > self.parents[y]:
            x, y = y, x

        self.parents[x] += self.parents[y]
        self.parents[y] = x

    def size(self, x):
        return -self.parents[self.find(x)]

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

    def members(self, x):
        root = self.find(x)
        return [i for i in range(self.n) if self.find(i) == root]

    def roots(self):
        return [i for i, x in enumerate(self.parents) if x < 0]

    def group_count(self):
        return len(self.roots())

    def all_group_members(self):
        return {r: self.members(r) for r in self.roots()}

    def __str__(self):
        return '\n'.join('{}: {}'.format(r, self.members(r)) for r in self.roots())


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

AB = []
for i in range(M):
    AB.append(list(map(int,input().split())))

out = 0
for break in range(M):
    Network = UnionFind(N)
    for j in range(M):
        if j!=break:
            A,B=AB[j][0],AB[j][1]
            Network.union(A-1, B-1)
    if Network.group_count()==2:
        out+=1
print(out)

### FIXED CODE ###

N,M = list(map(int,input().split()))
AB = []
from collections import deque

for i in range(M):
    AB.append(list(map(int,input().split())))


out = 0
for remove in range(M):
    G = [[] for i in range(N)]
    for i in range(M):
        if i==remove:
            continue
        else:
            A,B=AB[i]
            G[A-1].append(B-1)
            G[B-1].append(A-1)
    s = 0
    visit = [0]*N
    que = deque([s])
    visit[s] = 1
    while que:
        v = que.popleft()
        for w in G[v]:
            if visit[w] == 1:
                continue
            visit[w] =  1
            que.append(w)
    if sum(visit)!=N:
        out+=1
print(out)
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import sys

input = sys.stdin.readline

def main():
    N = int(input())
    A = list(map(int, input().split()))
    B = list(map(int, input().split()))

    def f(i):
        if i >= N:
            return 0

        n = 0
        m = min(A[i], B[i])
        n += m
        A[i] -= m
        B[i] -= m
        m = min(A[i+1], B[i])
        n += m
        A[i+1] -= m
        B[i] -= m
        return n + f(i+1)

    n = f(0)
    print(n)

main()

### FIXED CODE ###

#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import sys

input = sys.stdin.readline

def main():
    N = int(input())
    A = list(map(int, input().split()))
    B = list(map(int, input().split()))

    n = 0
    for i in range(N):
        m = min(A[i], B[i])
        n += m
        A[i] -= m
        B[i] -= m
        m = min(A[i+1], B[i])
        n += m
        A[i+1] -= m
        B[i] -= m

    print(n)

main()
N,M = map(int,input().split())
cnt = [0 for i in range(M)]
for i in range(N):
    A = list(map(int,input().split()))
    A = A[1:]
    for j in range(len(A)):
        cnt[A[j]] += 1

print(cnt.count(N))

### FIXED CODE ###

N,M = map(int,input().split())
cnt = [0 for i in range(M)]
for i in range(N):
    A = list(map(int,input().split()))
    A = A[1:]
    for j in range(len(A)):
        cnt[A[j]-1] += 1

print(cnt.count(N))
n, m = map(int, input().split())
a = [int(input()) for _ in range(m)]
a = set(a)

s[0] = 1
s[1] = 1 if 1 not in a else 0

for i in range(2, n+1):
    if i in a:
        continue
    s[i] = (s[i-1] + s[i-2]) % 1000000007

print(s[n])

### FIXED CODE ###

def main():
    n, m = map(int, input().split())
    if m != 0:
        a = [int(input()) for _ in range(m)]
        a = set(a)
    else:
        a = set()
    
    s = [0] * (n+1)
    s[0] = 1
    s[1] = 1 if 1 not in a else 0

    for i in range(2, n+1):
        if i in a:
            continue
        s[i] = (s[i-1] + s[i-2]) % 1000000007

    print(s[n])

main()
num = list(input())

num.sort().reverse()

print(int(num[0] + num[1]) + int(num[2]))




### FIXED CODE ###

s = input()

num = list(s)

num.sort()
num.reverse()

print(int(num[0] + num[1]) + int(num[2]))
a , b = map(int, input().split())

ans1 = a * B
ans2 = a* b * 2
ans3 = a * b* 3

if ans1%2 == 1:
    print('Yes')
    exit
elif ans2%2 ==1:
    print('Yes')
    exit
elif ans2%2 ==1:
    print('Yes')
    exit
else:
    print("No")

### FIXED CODE ###

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

ans1 = a * b
ans2 = a* b * 2
ans3 = a * b* 3

if ans1%2 == 1:
    print('Yes')
    exit
elif ans2%2 ==1:
    print('Yes')
    exit
elif ans2%2 ==1:
    print('Yes')
    exit
else:
    print("No")
s=input()
i=1
ans=''

while i<=len(s):
  if s[i-1]=='A'|s[i-1]=='C'|s[i-1]=='G'|s[i-1]=='T':
    i=i+ans
  i+=1

print (len(ans))  

### FIXED CODE ###

s=input()
i=1
n=0
ans=[0]
sta=0

 
while i<=len(s):
  if s[i-1]=='A'or s[i-1]=='C' or s[i-1]=='G' or s[i-1]=='T':
    n=n+1
    sta=1
  elif sta==1:
    ans.append(n)
    n=0

  if i<=len(s)&n==len(s):
    ans.append(n)
  elif n!=0:
      ans.append(n)
    
  i=i+1
  
print(max(ans))
T = N * A

L = [T, B]
min(L)

### FIXED CODE ###

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

L = [T, B]
print(min(L))
n, m = map(int, input().split())
mod = 10 ** 9 + 7
a = []
for i in range(m):
    a.append(int(input()))

dp = [-1] * (n + 1)


def dfs(step):
    if dp[step] >= 0:
        return dp[step]
    if step - 1 in a and step - 2 in a:
        return 0
    cnt = 0
    if step <= 0:
        return 1
    if step - 1 >= 0 and step - 1 not in a:
        cnt += dfs(step - 1)
    if step - 2 >= 0 and step - 2 not in a:
        cnt += dfs(step - 2)
    dp[step] = cnt
    return cnt % mod


print(dfs(n))


### FIXED CODE ###

n, m = map(int, input().split())
mod = 10 ** 9 + 7
pat = [0] * (n + 2)
pat[0] = 1
pat[1] = 1

for i in range(m):
    a = int(input())
    pat[a] = -1

for i in range(2, n + 1):
    if pat[i] < 0:
        continue
    if pat[i - 1] > 0:
        pat[i] = (pat[i] + pat[i - 1]) % mod
    if pat[i - 2] > 0:
        pat[i] = (pat[i] + pat[i - 2]) % mod

print(pat[n])
a, b = map(int, input().split())

upper = 1300

price = -1
for i in range(1, upper):
  tax8 = int(i*0.08)
  tax10 = int(i*0.1)
  if a == tax8 ans b == tax10:
    price = i
    break
    
print(price)

### FIXED CODE ###

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

upper = 1300

price = -1
for i in range(1, upper):
    tax8 = int(i * 0.08)
    tax10 = int(i * 0.1)
    if a == tax8 and b == tax10:
        price = i
        break

print(price)
n, m = map(int, input().split())

array = [[int(x) for x in input().split()] for x in range(m)]

adj_array = [[] for x in range(m + 1)]
res_array = [True] + [False for x in range(n)]
for item in array:
    adj_array[item[0]].append(item[1])
    adj_array[item[1]].append(item[0])


def dfs(n, res_array, res):
    res_array[n] = True
    if False not in res_array:
        return res+1
    else:
        for next in adj_array[n]:
            if not res_array[next]:
                res = dfs(next, list(res_array), res)
    return res


res = 0
res_array[1] = True
print(dfs(1, res_array, res))


### FIXED CODE ###

import sys

n, m = map(int, input().split())

array = [[int(x) for x in input().split()] for x in range(m)]

if m == 0:
    print(0)
    sys.exit()

adj_array = [[] for x in range(n + 1)]
res_array = [True] + [False for x in range(n)]
for item in array:
    adj_array[item[0]].append(item[1])
    adj_array[item[1]].append(item[0])


def dfs(n, res_array, res):
    res_array[n] = True
    if False not in res_array:
        return res+1
    else:
        for next in adj_array[n]:
            if not res_array[next]:
                res = dfs(next, list(res_array), res)
    return res


res = 0
res_array[1] = True
print(dfs(1, res_array, res))
n=int(input())
s,t=input().split()
out=""
for i=range(n):
  out+=s[i]+t[i]
print(out)

### FIXED CODE ###

n=int(input())
s,t=input().split()
out=""
for i in range(n):
  out+=s[i]+t[i]
print(out)
x,y = tuple(map(int,input().split()))

for i in range(1,10*18):
  x<<=1
  if x>y:
    print(i)
    break


### FIXED CODE ###

x,a,b = tuple(map(int,input().split()))
 
if a-b>=0 :
  print("delicious")
elif b-a<=x:
  print("safe")
else:
  print("dangerous")