Let's call an array of non-negative integers $a_1, a_2, \ldots, a_n$ a $k$-extension for some non-negative integer $k$ if for all possible pairs of indices $1 \leq i, j \leq n$ the inequality $k \cdot |i - j| \leq min(a_i, a_j)$ is satisfied. The expansion coefficient of the array $a$ is the maximal integer $k$ such that the array $a$ is a $k$-extension. Any array is a 0-expansion, so the expansion coefficient always exists.

You are given an array of non-negative integers $a_1, a_2, \ldots, a_n$. Find its expansion coefficient.


-----Input-----

The first line contains one positive integer $n$ — the number of elements in the array $a$ ($2 \leq n \leq 300\,000$). The next line contains $n$ non-negative integers $a_1, a_2, \ldots, a_n$, separated by spaces ($0 \leq a_i \leq 10^9$).


-----Output-----

Print one non-negative integer — expansion coefficient of the array $a_1, a_2, \ldots, a_n$.


-----Examples-----
Input
4
6 4 5 5

Output
1
Input
3
0 1 2

Output
0
Input
4
821 500 479 717

Output
239


-----Note-----

In the first test, the expansion coefficient of the array $[6, 4, 5, 5]$ is equal to $1$ because $|i-j| \leq min(a_i, a_j)$, because all elements of the array satisfy $a_i \geq 3$. On the other hand, this array isn't a $2$-extension, because $6 = 2 \cdot |1 - 4| \leq min(a_1, a_4) = 5$ is false.

In the second test, the expansion coefficient of the array $[0, 1, 2]$ is equal to $0$ because this array is not a $1$-extension, but it is $0$-extension.

Source: codeforces | Difficulty: EASY
Tags: Mathematics

Implementation


Solutions:
from sys import stdin, setrecursionlimit
from bisect import bisect_right
setrecursionlimit(15000)

def check(num, arr):
	j = 0
	for i in range(len(arr)):
		if min(arr[i], arr[j]) < num * abs(i - j):
			return False
	j = len(arr) - 1
	for i in range(len(arr)):
		if min(arr[i], arr[j]) < num * abs(i - j):
			return False
	return True
n = int(stdin.readline().strip())
arr = list(map(int, stdin.readline().split()))
start = 0
end = 10 ** 9
while True:
	if start >= end:
		if check(start, arr):
			pass
		else:
			start -= 1
		break
	mid = (start + end) // 2
	if check(mid, arr):
		start = mid + 1
	else:
		end = mid - 1
if check(start + 1, arr):
	print(max(0, start + 1))
else:
	print(max(0, start))


n = int(input())
l = list(map(int, input().split()))
a = max(l)
for i in range(n):
	k = l[i] // max(i, n - i - 1)
	if k < a:
		a = k
print(a)


def solve(a):
	for ea in map(enumerate, (a, a[::-1])):
		next(ea)
		for (i, ai) in ea:
			yield (ai // i)

def main():
	input()
	print(min(solve(tuple(map(int, input().split())))))
main()


n = int(input())
a = [int(x) for x in input().split()]
mn = min(a)
for i in range(n):
	mn = min(mn, a[i] // max(i, n - i - 1))
print(mn)


n = int(input())
nums = [int(x) for x in input().split()]
ans = 10 ** 12
for (idx, num) in enumerate(nums):
	dist = max(idx, n - idx - 1)
	curr = num // dist
	ans = min(ans, curr)
print(ans)


n = int(input())
u = list(map(int, input().split()))
ans = min(u)
for i in range(1, n):
	ans = min(ans, min(u[0], u[i]) // i)
	if i != n - 1:
		ans = min(ans, min(u[-1], u[i]) // (n - i - 1))
print(ans)


n = int(input())
d = [int(x) for x in input().split()]
m = float('inf')
for i in range(n):
	m = min(m, int(d[i] / max(i, n - i - 1)))
print(m)


n = int(input())
s = list(map(int, input().split()))
d = []
for i in range(n):
	d.append(s[i] // max(n - i - 1, i))
print(min(d))


n = int(input())
a = [int(_) for _ in input().split()]
kmin = 10000000000000
mn = 1000000000000
for i in range(n - 1):
	mn = min(mn, a[i], a[n - 1 - i])
	p = mn // (n - i - 1)
	if p <= kmin:
		kmin = p
print(kmin)


n = int(input())
l = list(map(int, input().split()))
ans = max(l)
for i in range(n):
	ans = min(ans, l[i] // max(i, n - i - 1))
print(ans)


a = int(input())
s = [int(i) for i in input().split()]
otv = 10000000000
for i in range(0, a):
	if i >= a // 2:
		j = 0
	else:
		j = a - 1
	minus = min([s[i], s[j]])
	z = minus // abs(i - j)
	if z < otv:
		otv = z
print(otv)


n = int(input())
ar = list(map(int, input().split()))
m = ar[0] // (n - 1)
for i in range(1, n):
	m = min(m, ar[i] // max(n - i - 1, i))
print(m)


import sys
n = int(input())
ls = list(map(int, input().split()))
ans = sys.maxsize
for i in range(n):
	ans = min(ans, ls[i] // max(i, n - i - 1))
print(ans)


n = int(input())
s = list(map(int, input().split()))
a = 10000000000.0
for i in range(len(s)):
	if i != 0:
		q = min(s[i], s[0]) // i
	else:
		q = 10000000000.0
	if i != n - 1:
		w = min(s[i], s[-1]) // (n - 1 - i)
	else:
		w = 10000000000.0
	a = min(a, q, w)
print(a)


from sys import stdin, maxsize
from bisect import bisect_left

def read_input():
	n = int(input())
	arr = [int(x) for x in stdin.readline().split(' ')]
	return (n, arr)
(n, arr) = read_input()
res = maxsize
for (i, el) in enumerate(arr):
	res = min(res, el // max(i, n - i - 1))
print(res)


n = int(input())
a = list(map(int, input().split()))
print(min((a[i] // max(i, n - i - 1) for i in range(n))))


n = int(input())
lis = list(map(int, input().split()))
i = 0
ans = 1000000000
while i < n - 1:
	temp = min(lis[i], lis[n - 1]) // (n - i - 1)
	ans = min(ans, temp)
	i += 1
i = n - 1
while i > 0:
	temp = min(lis[i], lis[0]) // i
	ans = min(ans, temp)
	i -= 1
print(ans)


n = int(input())
arr = [int(i) for i in input().split()]
ans = 10000000000.0
for i in range(len(arr)):
	if i != 0:
		sub1 = min(arr[i], arr[0]) // i
	else:
		sub1 = 10000000000.0
	if i != n - 1:
		sub2 = min(arr[i], arr[-1]) // (n - 1 - i)
	else:
		sub2 = 10000000000.0
	ans = min(ans, sub1, sub2)
print(ans)


n = int(input())
arr = map(int, input().split())
arr = list(arr)
a = []
k = 0
for i in range(n):
	if i < n / 2:
		a.append(arr[i] / (n - i - 1))
	else:
		a.append(arr[i] / i)
print(int(min(a)))


n = int(input())
nums = list(map(int, input().split()))
numsIndex = [[nums[i], i] for i in range(n)]
posK = float('inf')
for i in numsIndex:
	posK = min(posK, i[0] // max(i[1], n - i[1] - 1))
print(posK)


from math import inf
n = int(input()) - 1
nums = list(map(int, input().split()))
minimum = inf
for (idx, num) in enumerate(nums):
	temp = inf
	mo = max(idx - 0, n - idx)
	minimum = min(minimum, num // mo)
print(minimum)


n = int(input())
l = list(map(int, input().split()))
min_array = []
min_array2 = []
for i in range(int(n / 2)):
	if len(min_array) == 0 or min_array[-1] > l[i]:
		min_array.append(l[i])
	else:
		min_array.append(min_array[-1])
for i in range(1, int(n / 2) + 1):
	if len(min_array2) == 0 or min_array2[-1] > l[-i]:
		min_array2.append(l[-i])
	else:
		min_array2.append(min_array2[-1])
r = []
for i in range(len(min_array2)):
	s = (min_array2[i], min_array[i])
	r.append(s)
z = float('inf')
k = float('inf')
for i in range(len(r)):
	z = min(z, r[i][0], r[i][1])
	k = min(k, int(z / (n - 1 - i)))
k1 = min(l) / int(n / 2)
print(min(k, k1))


n = int(input())
lst = list(map(int, input().split()))
x = []
for i in range(n):
	x.append(lst[i])
x.sort()
ans = 10 ** 100
for i in range(n):
	diff = max(n - i - 1, i)
	ans = min(ans, lst[i] // diff)
print(ans)


n = int(input())
lst = [int(i) for i in input().split()]
min1 = None
for i in range(0, n):
	if i > n - i - 1:
		c = min(lst[i], lst[0])
		d = c // i
	else:
		c = min(lst[i], lst[n - 1])
		d = c // (n - i - 1)
	if min1 == None:
		min1 = d
	elif min1 > d:
		min1 = d
print(min1)


n = int(input())
a = list(map(int, input().split()))
k = 1 << 60
for i in range(n):
	if i:
		k = min(k, min(a[0], a[i]) // i)
	if i < n - 1:
		k = min(k, min(a[-1], a[i]) // (n - 1 - i))
print(k)


n = int(input())
res = []
list = [int(i) for i in input().split()]
for i in range(1, n - 1):
	res.append(min(int(min(list[0], list[i]) / i), int(min(list[n - 1], list[i]) / (n - 1 - i))))
res.append(int(min(list[0], list[n - 1]) / (n - 1)))
print(min(res))


n = int(input())
a = list(map(int, input().split()))
k = float('inf')
for i in range(n):
	if i == 0:
		x = min(a[0], a[-1])
		y = n - 1
		z = x // y
		k = min(k, z)
	elif i == n - 1:
		x = min(a[0], a[-1])
		y = n - 1
		z = x // y
		k = min(k, z)
	else:
		x = min(a[i], a[0])
		y = i
		z = x // y
		k = min(k, z)
		x = min(a[i], a[-1])
		y = n - i - 1
		z = x // y
		k = min(k, z)
print(k)


n = int(input())
s = input('')
q = [(int(x), i) for (i, x) in enumerate(s.split(' '))]
a = []
for r in range(n):
	a.append(1)
q = sorted(q, key=lambda x: x[0])
min_p = 0
max_p = n - 1
min_k = 2000000000.0
for (value, index) in q:
	if index != 0:
		min_k = min(min_k, value / index)
	if n - 1 - index != 0:
		min_k = min(min_k, value / (n - 1 - index))
print(int(min_k))


n = int(input())
l = input().split()
li = [int(i) for i in l]
lo = []
for i in range(n):
	z = max(i, n - 1 - i)
	lo.append(li[i] // z)
print(min(lo))


import math
from fractions import Fraction
n = int(input())
nums = [int(t) for t in input().split(' ')]
if 0 in nums:
	print(0)
else:
	best_ratio = Fraction(0, 1)
	for (i, num) in enumerate(nums):
		farthest_idx = max(i, n - i - 1)
		ratio = Fraction(farthest_idx, num)
		best_ratio = max(ratio, best_ratio)
	print(math.floor(1 / best_ratio))


n = int(input())
l = list(map(int, input().split()))
k = 10000000000.0
for i in range(n):
	ma = l[i] // max(i, n - i - 1)
	k = min(k, ma)
print(k)


n = int(input())
a = list(map(int, input().split()))
mn = 10 ** 9
for i in range(n):
	mn = min(mn, a[i] // max(n - i - 1, i))
print(mn)


n = int(input())
l = list(map(int, input().split()))
a = min(l)
b = max(l)
z1 = l.index(a)
z2 = l.index(b)
k1 = min(l[0], l[n - 1]) // abs(n - 1)
ba = []
sa = []
for i in range(len(l)):
	if i != z1:
		ba.append(a // abs(z1 - i))
for i in range(len(l)):
	if i != z2:
		ba.append(min(b, l[i]) // abs(z2 - i))
ba.sort()
sa.sort()
z = ba[0]
h = 10 ** 18
if len(sa) > 0:
	h = sa[0]
i = 0
j = n - 1
mini1 = 10 ** 19
mini2 = 10 ** 19
for i in range(1, n):
	k = min(l[i], l[0]) // abs(i)
	mini1 = min(mini1, k)
for i in range(n - 1):
	k = min(l[i], l[-1]) // abs(n - 1 - i)
	mini2 = min(mini2, k)
print(min(k1, z, h, mini1, mini2))


from math import inf
counter = inf
n = int(input())
a = [int(x) for x in input().split()]
for i in range(n):
	counter = min(counter, a[i] // max(i, n - i - 1))
print(counter)


import sys
input = sys.stdin.readline
n = int(input())
a_list = list(map(int, input().split()))
k = 10 ** 9 + 1
for (i, a) in enumerate(a_list):
	k = min(k, int(a / max(i, n - i - 1)))
print(k)


from sys import stdin
input = stdin.readline
n = int(input())
a = list(map(int, input().rstrip().split(' ')))
k = 10000000000.0
for i in range(n):
	if i < n // 2:
		t = min(a[i], a[-1]) // (n - i - 1)
	else:
		t = min(a[i], a[0]) // i
	k = min(t, k)
	if k == 0:
		break
print(k)


n = int(input())
nums = [int(i) for i in input().split()]
resp = float('inf')
prim = nums[0]
for (i, num) in enumerate(nums):
	if i == 0:
		continue
	k = min(prim, num) / i
	if int(k) < resp:
		resp = int(k)
menor = min(nums)
i_menor = nums.index(menor)
for (i, num) in enumerate(nums):
	if i == i_menor:
		continue
	k = menor / abs(i_menor - i)
	if int(k) < resp:
		resp = int(k)
ult = nums[n - 1]
for (i, num) in enumerate(nums):
	if i == n - 1:
		break
	k = min(ult, num) / abs(n - i - 1)
	if int(k) < resp:
		resp = int(k)
print(resp)


import math
n = int(input())
a = list(map(int, input().split()))
k = math.inf
for i in range(n):
	if i < n / 2:
		t = a[i] / (n - 1 - i)
	else:
		t = a[i] / i
	k = min(k, t)
print(int(k))


n = int(input())
a = input().split()
a = [int(i) for i in a]
k = 1061109567
for i in range(n):
	k = min(k, int(a[i] / max(i, n - i - 1)))
if k == 1061109567:
	k = 0
print(k)


import math
n = input()
n = int(n)
l = list(map(int, input().split()))
index = 0
m = l[0]
for i in range(n):
	j = i + 1
	if l[i] // max(abs(j - 1), abs(n - j)) < m:
		m = l[i] // max(abs(j - 1), abs(n - j))
print(m)


def go():
	n = int(input())
	a = [int(i) for i in input().split(' ')]
	k = min(a[n - 1], a[0]) // (n - 1)
	for i in range(1, n - 1):
		start = min(a[i], a[0]) // i
		end = min(a[i], a[n - 1]) // (n - i - 1)
		k = min(k, start, end)
	return k
print(go())


import os, sys
from io import BytesIO, IOBase

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
BUFSIZE = 8192
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
rstr = lambda : input().strip()
rstrs = lambda : [str(x) for x in input().split()]
rstr_2d = lambda n: [rstr() for _ in range(n)]
rint = lambda : int(input())
rints = lambda : [int(x) for x in input().split()]
rint_2d = lambda n: [rint() for _ in range(n)]
rints_2d = lambda n: [rints() for _ in range(n)]
(n, a, ans) = (rint(), rints(), float('inf'))
for i in range(n):
	ans = min(ans, a[i] // max(i, n - i - 1))
print(ans)


def main():
	n = int(input())
	a = list(map(int, input().split()))
	ret = float('inf')
	for i in range(n):
		length = max(i, n - i - 1)
		ret = min(ret, a[i] // length)
	print(ret)
main()


a = int(input())
z = list(map(int, input().split()))
from bisect import *
import math
ans = [z[0]]
fin = [1]
mini = math.inf

def index(ans, val):
	l = 0
	r = len(ans)
	indec = math.inf
	while l < r:
		mid = (l + r) // 2
		if ans[mid] >= val:
			indec = min(indec, mid)
			r = mid
		else:
			l = mid + 1
	return indec
for i in range(1, len(z)):
	r = bisect_left(ans, z[i])
	if r == len(ans):
		if z[i] > ans[-1]:
			ans.append(z[i])
			fin.append(i + 1)
		continue
	mini = min(mini, z[i] // (i + 1 - fin[r]))
	if z[i] > ans[-1]:
		ans.append(z[i])
		fin.append(i + 1)
ans = [z[-1]]
fin = [len(z)]
for i in range(len(z) - 2, -1, -1):
	t = index(ans, z[i])
	if t == math.inf:
		if z[i] < ans[-1]:
			ans.append(z[i])
			fin.append(i + 1)
		continue
	mini = min(mini, z[i] // abs(i + 1 - fin[t]))
print(mini)


n = int(input())
l = [int(x) for x in input().split()]
ans = 10000000000.0
for i in range(n):
	ans = min(ans, l[i] // max(n - i - 1, i))
print(ans)


n = int(input())
print(min((x // max(i, n - i - 1) for (i, x) in enumerate(map(int, input().split())))))


from sys import stdin, stdout
import sys
n = int(stdin.readline().strip())
arr = list(map(int, stdin.readline().strip().split(' ')))
ind = arr.index(min(arr))
exp = sys.maxsize
for i in range(1, len(arr)):
	exp = min(exp, min(arr[i], arr[0]) // i)
for i in range(len(arr) - 1):
	exp = min(exp, min(arr[i], arr[-1]) // (len(arr) - 1 - i))
stdout.write(str(exp))


n = int(input())
ch = input()
L = [int(i) for i in ch.split()]
L2 = [0] * n
for i in range(n):
	L2[i] = L[i] // max(i, n - 1 - i)
print(min(L2))


from sys import *
from math import *
n = int(stdin.readline())
a = list(map(int, stdin.readline().split()))
ans = []
ans.append(a[0] // (n - 1))
ans.append(a[-1] // (n - 1))
for i in range(1, n - 1):
	ans.append(min(a[i] // i, a[i] // (n - i - 1)))
print(min(ans))


import bisect
import decimal
from decimal import Decimal
import os
from collections import Counter
import bisect
from collections import defaultdict
import math
import random
import heapq
from math import sqrt
import sys
from functools import reduce, cmp_to_key
from collections import deque
import threading
from itertools import combinations
from io import BytesIO, IOBase
from itertools import accumulate
decimal.getcontext().prec = 46

def primeFactors(n):
	prime = set()
	while n % 2 == 0:
		prime.add(2)
		n = n // 2
	for i in range(3, int(math.sqrt(n)) + 1, 2):
		while n % i == 0:
			prime.add(i)
			n = n // i
	if n > 2:
		prime.add(n)
	return list(prime)

def getFactors(n):
	factors = []
	i = 1
	while i <= math.sqrt(n):
		if n % i == 0:
			if n // i == i:
				factors.append(i)
			else:
				factors.append(i)
				factors.append(n // i)
		i = i + 1
	return factors

def SieveOfEratosthenes(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	num = []
	for p in range(2, n + 1):
		if prime[p]:
			num.append(p)
	return num

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

def sort_dict(key_value):
	return sorted(key_value.items(), key=lambda kv: (kv[1], kv[0]))

def list_input():
	return list(map(int, input().split()))

def num_input():
	return map(int, input().split())

def string_list():
	return list(input())

def decimalToBinary(n):
	return bin(n).replace('0b', '')

def binaryToDecimal(n):
	return int(n, 2)

def DFS(n, s, adj):
	visited = [False for i in range(n + 1)]
	stack = []
	stack.append(s)
	while len(stack):
		s = stack[-1]
		stack.pop()
		if not visited[s]:
			visited[s] = True
		for node in adj[s]:
			if not visited[node]:
				stack.append(node)

def solve():
	n = int(input())
	arr = list_input()
	if arr[0] == 0:
		print(0)
		return
	ans = 10 ** 12
	for i in range(n):
		ans = min(ans, arr[i] // max(i, n - i - 1))
	print(ans)
t = 1
for _ in range(t):
	solve()


from sys import stdin, stdout

def fn(k):
	for i in range(n):
		if k * i > a[i]:
			return False
		if k * (n - 1 - i) > a[i]:
			return False
	return True
for _ in range(1):
	n = int(stdin.readline())
	a = list(map(int, stdin.readline().split()))
	l = 0
	r = 10 ** 9 + 7
	while l <= r:
		mid = l + r >> 1
		if fn(mid):
			l = mid + 1
		else:
			r = mid - 1
	print(r)


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

def k_extension(arr):
	n = len(arr)
	if n == 2:
		return min(arr)
	s = set()
	for i in range(0, n // 2 + 1):
		m = min(arr[i], arr[-i - 1])
		s.add(int(m / (n - 1 - i)))
	return min(s)
print(k_extension(l))


n = int(input())
a = [int(x) for x in input().split()]
ans = a[0]
for i in range(n):
	d = max(n - i - 1, i)
	if a[i] // d < ans:
		ans = a[i] // d
print(ans)


n = int(input())
nums = list(map(int, input().split()))
minimum = 10 ** 9 + 1
for i in range(n):
	below = max(n - 1 - i, i - 0)
	upper = nums[i]
	minimum = min(upper // below, minimum)
print(minimum)


n = int(input())
A = [int(x) for x in input().split()]
best = 10 ** 9
minimum = 10 ** 9
for sub_dist in range(0, (n + 1) // 2):
	minimum = min([minimum, A[sub_dist], A[n - 1 - sub_dist]])
	best = min([best, minimum // (n - 1 - sub_dist)])
print(best)


n = int(input())
arr = [int(x) for x in input().split()]
mn = -1
ln = len(arr)
for i in range(0, ln):
	offset = max([i, ln - 1 - i])
	if mn == -1:
		mn = int(arr[i] / offset)
	else:
		mn = min(mn, int(arr[i] / offset))
print(mn)


n = int(input())
l = list(map(int, input().split()))
mi = 1000000000000000
ll = []
for i in range(n):
	ll.append((l[i], i))
ll.sort()
for i in ll:
	mm = max(i[1], n - i[1] - 1)
	if i[0] // mm < mi:
		mi = i[0] // mm
print(mi)


n = int(input())
s = input()
cuv = ''
v = []
for c in s:
	if c != ' ':
		cuv += c
	else:
		v.append(int(cuv))
		cuv = ''
v.append(int(cuv))
k = min(v[0], v[n - 1]) // (n - 1)
for i in range(1, n - 1):
	t1 = min(v[i], v[0]) // i
	t2 = min(v[i], v[n - 1]) // (n - 1 - i)
	t = min(t1, t2)
	if t < k:
		k = t
print(k)


n = int(input())
s = list(map(int, input().split()))
m = 10 ** 9
for (i, x) in enumerate(s):
	m = min(m, x // max(i, n - i - 1))
print(m)


n = int(input())
arr = list(map(int, input().split()))
ans = 10 ** 18
for i in range(n):
	ans = min(ans, arr[i] // max(abs(i - n + 1), i))
print(ans)


n = int(input())
a = [int(i) for i in input().split()]
k = min(a)
for i in range(n):
	mi = a[i]
	if i >= n // 2:
		z = i
	else:
		z = n - i - 1
	b = mi // z
	if k > b:
		k = b
print(k)


from sys import stdin
n = int(input())
l = list(map(int, stdin.readline().rstrip().split(' ')))
m = l[0]
for i in range(1, n):
	x = min(l[0], l[i])
	t = x // i
	z = x // max(n - 1 - i, i)
	m = min(m, min(t, z))
print(m)


from math import *
n = int(input())
a = []
b = list()
a = list(map(int, input().split(' ')))
for i in range(n):
	a[i] = a[i] // max(i, n - i - 1)
print(min(a))


(n, a) = (int(input()), list(map(int, input().split())))
print(min((ai // max(i, n - i - 1) for (i, ai) in enumerate(a))))


n = int(input())
a = [int(x) for x in input().split()]
k = int(min(a[0], a[n - 1]) / (n - 1))
for i in range(1, n - 1):
	mn = min(a[i], a[0])
	k = int(min(k, mn / i))
	mn = min(a[i], a[n - 1])
	k = int(min(k, mn / (n - i - 1)))
print(k)


n = int(input())
a = list(map(int, input().split()))
ans = float('inf')
for i in range(n):
	ans = min(ans, a[i] // max(i, n - i - 1))
print(ans)


import math
n = int(input())
a = list(map(int, input().split()))
k = math.inf
for i in range(n):
	if k > a[i] // max(n - i - 1, i):
		k = a[i] // max(n - i - 1, i)
print(k)


import heapq
n = int(input())
a = list(map(int, input().split()))
h = []
for i in range(n):
	heapq.heappush(h, (a[i], i))
ret = float('inf')
while h:
	(curVal, curIdx) = heapq.heappop(h)
	furthest = n - 1
	if curIdx == furthest or curIdx > n - curIdx:
		furthest = 0
	ret = min(ret, curVal // abs(curIdx - furthest))
print(ret)


def main():
	n = int(input())
	arr = list(map(int, input().split()))
	ans = 10 ** 10
	for i in range(n):
		x = i if i > n - i - 1 else n - i - 1
		ans = min(ans, arr[i] // x)
	print(ans)
main()


n = int(input())
a = list(map(int, input().strip().split()))
k = 1000000000
for i in range(n):
	k = min(k, min(a[n - 1], a[i]) // max(abs(n - i - 1), i))
print(k)


import os
import sys

def log(*args, **kwargs):
	if os.environ.get('CODEFR'):
		print(*args, **kwargs)
n = int(input())
a = list(map(int, input().split()))
result = a[0]
for (i, a1) in enumerate(a):
	if i > 0:
		result = min(result, a1 // i)
	if i < n - 1:
		result = min(result, a1 // (n - i - 1))
print(result)


def getn():
	return int(input())

def getns():
	return [int(x) for x in input().split()]
n = getn()
ns = getns()
d = {}
for i in range(n):
	c = ns[i]
	if c not in d:
		d[c] = [i, i]
	else:
		d[c][1] = i
mm = max(ns)
mi = min(ns)
if mi == 0:
	print(0)
	quit()
ans = mm
for k in d.keys():
	if k > 2 * mi:
		continue
	(s, e) = d[k]
	s = k / max(s, n - 1 - s, e, n - 1 - e)
	ans = min(ans, s)
print(int(ans))


n = int(input())
A = list(map(int, input().split()))
m = A[0]
for i in range(len(A)):
	m = min(A[i] // max(i, n - i - 1), m)
print(m)


n = int(input())
sp = list(map(int, input().split()))
k = 10 ** 9 + 1
zn1 = sp[0]
zn2 = sp[-1]
ch2 = min(sp[0], zn2) // (n - 1)
if ch2 < k:
	k = ch2
for i in range(1, n - 1):
	ch1 = min(sp[i], zn1) // i
	ch2 = min(sp[i], zn2) // (n - i - 1)
	if ch2 < k:
		k = ch2
	if ch1 < k:
		k = ch1
ch1 = min(sp[-1], zn1) // (n - 1)
if ch1 < k:
	k = ch1
print(k)


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

def solve(t):
	return [t[a] // (n - a - 1) for a in range(len(t) - 1)]
print(min(solve(l) + solve(l[::-1])))


n = int(input())
a = [int(k) for k in input().split()]
b = [a[k] / max(k, n - k - 1) for k in range(n)]
print(int(min(b)))


import sys
n = int(sys.stdin.readline())
arr = list(map(int, sys.stdin.readline().split()))
ans = []
for i in range(1, n):
	temp = 9876543210
	for j in range(0, n, i):
		temp = min(temp, arr[j])
	for j in range(n - 1, -1, -i):
		temp = min(temp, arr[j])
	ans.append((temp, i))
res = []
for i in ans:
	res.append(i[0] // i[1])
print(min(res))


n = int(input())
A = list(map(int, input().split()))
ans = 10000000000
for i in range(n):
	denom = max(i, n - 1 - i)
	ans = min(ans, float(A[i]) / denom)
print(int(ans))


n = int(input())
a = list(map(int, input().split()))
res = a[0]
for i in range(n):
	step = max(i, n - i - 1)
	res = min(res, a[i] // step)
print(res)


n = int(input())
p = list(map(int, input().split()))
max_k = 1000000000000
for i in range(n):
	max_range_diff = max(i, n - i - 1)
	max_k = min(max_k, p[i] // max_range_diff)
print(max_k)


from math import floor
n = int(input())
A = list(map(int, input().split()))
k = floor(min((a / max(len(A) - i - 1, i) for (i, a) in enumerate(A))))
print(k)


R = lambda : map(int, input().split())
n = int(input())
k = 10 ** 9
a = list(R())
for i in range(n):
	k = min(k, a[i] / max(i, n - 1 - i))
print(int(k))


import sys
n = int(input())
lis = list(map(int, input().split()))
lis2 = []
for i in range(len(lis)):
	lis2.append((lis[i], i))
lis2.sort()
k = sys.maxsize
for i in lis2:
	range = max(i[1], n - i[1] - 1)
	k1 = i[0] // range
	if k1 < k:
		k = k1
print(k)


import math
n = int(input())
lst = list(map(int, input().strip().split(' ')))
if 0 in lst:
	print(0)
else:
	k = 2 * 10 ** 9
	for j in range(n):
		l = math.floor(lst[j] / max(j, n - j - 1))
		if l < k:
			k = l
	print(k)


def read_nums():
	return [int(x) for x in input().split()]

def main():
	(n,) = read_nums()
	nums = read_nums()
	a = [max(n - i - 1, i) for i in range(n)]
	k = min((num // val for (num, val) in zip(nums, a)))
	print(k)

def __starting_point():
	main()
__starting_point()


from math import inf
n = int(input().strip())
arr = list(map(int, input().strip().split()))
k = inf
minVal = inf
for i in range(n - 1, 0, -1):
	minVal = min([minVal, arr[i], arr[n - i - 1]])
	k = min(k, minVal // i)
print(k)


import math
import bisect
import heapq
from collections import defaultdict

def egcd(a, b):
	if a == 0:
		return (b, 0, 1)
	else:
		(g, x, y) = egcd(b % a, a)
		return (g, y - b // a * x, x)

def mulinv(b, n):
	(g, x, _) = egcd(b, n)
	if g == 1:
		return x % n

def isprime(n):
	for d in range(2, int(math.sqrt(n)) + 1):
		if n % d == 0:
			return False
	return True

def argsort(ls):
	return sorted(range(len(ls)), key=ls.__getitem__)

def f(p=0):
	if p == 1:
		return map(int, input().split())
	elif p == 2:
		return list(map(int, input().split()))
	elif p == 3:
		return list(input())
	else:
		return int(input())
n = f()
cl = f(2)
k = 10 ** 9
for i in range(n):
	if i == 0 or i == n - 1:
		k = min(k, cl[i] // (n - 1))
	else:
		k = min(k, cl[i] // (n - i - 1))
		k = min(k, cl[i] // i)
print(k)


n = int(input())
k = m = 10 ** 9
a = (*map(int, input().split()),)
for t in zip(a, a[:0:-1]):
	n -= 1
	m = min(m, *t)
	k = min(k, m // n)
print(k)


t = 1

def solve():
	ans = []
	ans.append(l[0] // (n - 1))
	ans.append(l[-1] // (n - 1))
	for i in range(1, n - 1):
		ans.append(min(l[i] // i, l[i] // (n - 1 - i)))
	return min(ans)
for _ in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	print(solve())


def moveLeft(markings, curr):
	for i in range(curr, len(markings)):
		if markings[i] == 0:
			return i
	return len(markings)

def moveRight(markings, curr):
	for i in range(curr, -1, -1):
		if markings[i] == 0:
			return i
	return -1
n = int(input())
arr = list(map(int, input().split()))
d = {}
for i in range(n):
	d[arr[i]] = i
arr1 = sorted(arr)
markings = [0 for i in range(n)]
left = 0
right = n - 1
minn = 10 ** 100
for i in range(n):
	curr = d[arr1[i]]
	if curr - left > 0:
		minn = min(minn, int(arr1[i] / (curr - left)))
	if right - curr > 0:
		minn = min(minn, int(arr1[i] / (right - curr)))
	markings[curr] = 1
	if curr == left:
		moveLeft(markings, curr)
	if curr == right:
		moveRight(markings, curr)
print(minn)


n = int(input())
l = list(map(int, input().split()))
l1 = []
for i in range(n - 1):
	if n - i - 1 > i:
		l1.append(min(l[i], l[n - 1]) / (n - i - 1))
	else:
		l1.append(min(l[i], l[0]) / i)
print(int(min(l1)))


import sys
input = sys.stdin.readline
n = int(input())
arr = [int(k) for k in input().split()]
ans = 10 ** 18
for i in range(n):
	ans = min(ans, arr[i] // max(n - 1 - i, i - 0))
print(ans)


n = int(input())
a = list(map(int, input().split()))
max1 = float('inf')
for q in range(len(a)):
	if q >= n - q - 1:
		max1 = min(max1, min(a[q], a[0]) // q)
	if q <= n - q - 1:
		max1 = min(max1, min(a[q], a[-1]) // (n - q - 1))
print(max1)


def main():
	n = int(input())
	array = list(map(int, input().split()))
	nums = []
	for i in range(n):
		nums.append((array[i], i + 1))
	k = float('inf')
	for i in range(1, n):
		diff = abs(i + 1 - 1)
		val = min(array[0], array[i])
		k = min(k, val // diff)
	for i in range(n - 2, -1, -1):
		diff = abs(i + 1 - n)
		val = min(array[-1], array[i])
		k = min(k, val // diff)
	if k == float('inf'):
		print(0)
	else:
		print(k)
main()


n = int(input())
arr1 = list(map(int, input().split()))
k = 99999999999999999
for i in range(len(arr1)):
	k = min(k, min(arr1[n - 1], arr1[i]) // max(abs(n - i - 1), i))
print(k)


def main():
	n = int(input())
	l = list(map(int, input().split()))
	ans = int(10000000000.0)
	for i in range(n):
		ans = min(ans, l[i] // max(i - 0, n - 1 - i))
	print(ans)
main()


n = int(input())
A = list(map(int, input().split()))
k = 10 ** 10
for i in range(1, n - 1):
	k = min(k, min(A[0], A[i]) // i)
	k = min(k, min(A[-1], A[i]) // (n - i - 1))
k = min(k, min(A[0], A[-1]) // (n - 1))
print(k)


n = int(input())
a = list(map(int, input().split()))
k = 10 ** 9 + 1
for i in range(1, n - 1):
	v1 = i
	v2 = n - i
	am1 = min(a[i], a[0])
	k1 = max(0, am1 // i)
	am2 = min(a[i], a[n - 1])
	k2 = max(0, am2 // (n - 1 - i))
	k = min([k, k1, k2])
kl = min(a[0], a[n - 1]) // (n - 1)
k = min(k, kl)
print(k)


import sys
sys.stdin.readline()
ar = [int(c) for c in sys.stdin.readline().split(' ')]
n = len(ar)
calcd = [a // max(i, n - i - 1) for (i, a) in enumerate(ar)]
sys.stdout.write(f'{min(calcd)}\n')


n = int(input())
mas = [int(i) for i in input().split()]
count = 100000000000000
for i in range(n):
	count = min(int(mas[i] / max(i, n - i - 1)), count)
print(count)


n = int(input())
expansion = list(map(int, input().split()))
output = float('inf')
for i in range(n):
	if i != 0:
		if output > expansion[i] // i:
			output = expansion[i] // i
	if i != n - 1:
		if output > expansion[i] // (n - i - 1):
			output = expansion[i] // (n - i - 1)
print(output)


import math
n = int(input())
z = list(map(int, input().split()))
result = math.inf
for i in range(n):
	tmp = z[i] / max(i, n - 1 - i)
	if tmp < result:
		result = tmp
print(int(result))


n = int(input())
arr = [int(i) for i in input().split()]
a = arr[0] // (n - 1)
for i in range(1, n):
	if n - i - 1 > i:
		temp = arr[i] // (n - i - 1)
		if temp < a:
			a = temp
	else:
		temp = arr[i] // i
		if temp < a:
			a = temp
print(a)


n = int(input())
A = list(map(int, input().split()))
B = []
for (i, a) in enumerate(A):
	B.append((a, i))
B.sort(key=lambda x: -x[0])
INF = 10 ** 18
M = -1
m = INF
k = INF
for (b, i) in B:
	if M != -1:
		k = min(k, b // abs(M - i))
	if m != INF:
		k = min(k, b // abs(m - i))
	M = max(i, M)
	m = min(i, m)
print(k)


n = int(input())
list1 = list(map(int, input().split()))
k = 10 ** 9
for i in range(len(list1)):
	k = min(k, list1[i] / max(i, n - i - 1))
print(int(k))


d = 0
import sys
r = lambda : sys.stdin.readline()
n = int(input())
arr = list(map(int, r().split()))
answer = float('inf')
for i in range(n):
	d = max(n - i - 1, i)
	answer_ = int(arr[i] / d)
	answer = min(answer, answer_)
if answer == float('inf'):
	print(0)
else:
	print(int(answer))


def extension(n, lst):
	minimum = 10 ** 9
	for i in range(n):
		minimum = min(minimum, lst[i] // max(i, n - 1 - i))
	return minimum
N = int(input())
a = [int(j) for j in input().split()]
print(extension(N, a))


__autor__ = 'Esfandiar'
import sys
input = sys.stdin.readline
n = int(input())
a = list(map(int, input().split()))
k = float('inf')
for i in range(1, n + 1):
	k = min(k, a[i - 1] // max(i - 1, n - i))
print(k)


n = int(input())
a = [int(s) for s in input().split()]
k = 99999999999999
for i in range(n):
	k = min(k, min(a[i], a[0]) // max(i, 1), min(a[i], a[n - 1]) // max(n - i - 1, 1))
print(k)


counter = 10 ** 9
n = int(input())
a = [int(x) for x in input().split()]
for i in range(n):
	counter = min(counter, a[i] // max(i, n - i - 1))
print(counter)


from sys import stdin
sys_input = stdin.readline

def si():
	return sys_input().rstrip()

def ii():
	return int(si())

def sti():
	return si().split()

def iti():
	return map(int, sti())

def sli():
	return list(si())

def ili():
	return list(iti())

def main():
	result = 10 ** 9
	for (i, a) in enumerate(A):
		dist = min(i, N - i - 1)
		div = N - dist - 1
		temp = a // div
		if result > temp:
			result = temp
	print(result)
	return
N = ii()
A = ili()
main()


from math import floor
n = int(input())
a = list(map(int, input().split()))
b = sorted(range(n), key=lambda k: a[k], reverse=True)
k = float('Inf')
for i in range(n):
	left = 0
	right = n - 1
	length = max(b[i] - left, right - b[i])
	k = min(k, floor(a[b[i]] / length))
	if b[i] == left:
		left = left + 1
	if b[i] == right:
		right = right - 1
k = int(k)
print(k)


from sys import stdin
n = int(stdin.readline().strip())
from math import ceil
s = list(map(int, stdin.readline().strip().split()))
s1 = s[::-1]
d = n - 1
mn = 10 ** 20
k = 10 ** 20
while d >= n // 2:
	mn = min(s1[-1], s[-1], mn)
	s1.pop()
	s.pop()
	k = min(k, mn // d)
	d -= 1
print(k)


n = int(input())
s = list(map(int, input().split()))
d = min(s[0], s[1])
for i in range(0, n):
	c = s[i] / max(i, n - i - 1)
	if c < d:
		d = c
print(int(d))


n = int(input())
d = list(map(int, input().split()))
t = 10 ** 9
for i in range(1, n + 1):
	j = max(i - 1, n - i)
	t = min(t, d[i - 1] // j)
print(t)


n = int(input())
s = input().split()
k = int(s[0])

def min(a, b):
	if a < b:
		return a
	else:
		return b
for i in range(0, n // 2):
	res = min(int(s[i]), int(s[n - 1])) // (n - 1 - i)
	if (res + 1) * (n - 1 - i) <= min(int(s[i]), int(s[n - 1])):
		if res + 1 < k:
			k = res + 1
	elif res < k:
		k = res
for i in range(n // 2, n):
	res = min(int(s[i]), int(s[0])) // i
	if (res + 1) * i <= min(int(s[i]), int(s[0])):
		if res + 1 < k:
			k = res + 1
	elif res < k:
		k = res
print(k)


n = int(input())
X = list(map(int, input().split()))
curr = 1000000000.0 + 5
for i in range(n):
	u = X[i] / max(i, n - i - 1)
	curr = min(curr, u)
print(int(curr))


import sys
import collections
import math
import heapq
from operator import itemgetter

def getint():
	return int(input())

def getints():
	return [int(x) for x in input().split(' ')]
n = getint()
a = getints()
k = float('inf')
for i in range(1, n + 1):
	k = min(k, a[i - 1] // max(i - 1, n - i))
print(str(k))


n = int(input())
array = list(map(int, input().split()))
k = 10 ** 10
for i in range(0, n):
	k = min(k, array[i] // max(i, n - i - 1))
print(k)


n = int(input())
a = list(map(int, input().split()))
t1 = 0
t2 = 0
t3 = 0
t4 = 0
m = n - 1
t1 = min(a[0], a[n - 1]) // m
mini = min(a)
mdist = -5
for i in range(n):
	if mini == a[i]:
		mdist = max(mdist, i, n - 1 - i)
t2 = mini // mdist
l = 999999999999999999
t3 = mini
t5 = 999999999999999999
for i in range(1, n - 1):
	temp1 = min(a[0], a[i]) // i
	temp2 = min(a[n - 1], a[i]) // (n - 1 - i)
	t5 = min(temp1, temp2, t5)
print(max(min(t1, t2, t3, t5), 0))


n = int(input())
arr = input().split()
l = 0
r = n - 1
min_arr = [0 for _ in range(n)]
cur_diff = n - 1
cur_min = None
while l <= r:
	if cur_min == None or (cur_min > int(arr[l]) or cur_min > int(arr[r])):
		cur_min = min(int(arr[l]), int(arr[r]))
	min_arr[cur_diff] = cur_min
	l += 1
	r -= 1
	cur_diff -= 1
for i in range(cur_diff + 1):
	min_arr[i] = cur_min
best = None
for i in range(1, len(min_arr)):
	tmp = min_arr[i] // i
	if best == None or best > tmp:
		best = tmp
print(best)


def isk(k, a, n):
	for i in range(n):
		for j in range(i, n):
			if not k * abs(i - j) <= min(a[i], a[j]):
				return False
	return True
n = int(input())
a = list(map(int, input().split()))
mink = min(a[n - 1], a[0]) // (n - 1)
for i in range(1, n - 1):
	k = min(min(a[i], a[0]) // abs(i - 0), min(a[i], a[n - 1]) // abs(i - (n - 1)))
	if k < mink:
		mink = k
print(mink)


n = int(input())
z = list(map(int, input().split()))
result = 9999999999999999999
for i in range(n):
	tmp = z[i] / max(i, n - 1 - i)
	if tmp < result:
		result = tmp
print(int(result))


n = int(input())
a = map(int, input().split())
k = 10 ** 10
for (i, ai) in enumerate(a):
	k = min(k, ai // max(n - (i + 1), i + 1 - 1))
print(k)


from math import *
n = int(input())
A = list(map(int, input().split()))
k = inf
for (i, v) in enumerate(A):
	(can1, can2) = (inf, inf)
	if i != 0:
		can1 = min(v, A[0]) // i
	if i != len(A) - 1:
		can2 = min(v, A[-1]) // (len(A) - 1 - i)
	cur = min(can1, can2)
	k = min(k, cur)
print(k)


a = int(input())
b = list(map(int, input().split()))
c = 9999999999
d = 9999999999
f = int((a - 1) / 2)
for i in range(0, f + 1):
	if b[i] < d:
		d = b[i]
	if b[a - i - 1] < d:
		d = b[a - i - 1]
	e = int(d / (a - i - 1))
	if e < c:
		c = e
print(c)


n = int(input())
A = list(input().split())
m = int(A[0])
for i in range(len(A)):
	x = int(A[i]) / max(i, n - i - 1)
	if x < m:
		m = x
print(int(m))


n = int(input())
a = [int(i) for i in input().split()]
ans = 10 ** 9
i = 0
for j in range(i + 1, n):
	ans = min(ans, min(a[i], a[j]) // abs(i - j))
i = n - 1
for j in range(i - 1, -1, -1):
	ans = min(ans, min(a[i], a[j]) // abs(i - j))
print(ans)


N = int(input())
ls = list(map(int, input().split()))
print(min([ls[i] // max(i, N - i - 1) for i in range(N)]))


n = int(input())
a = list(map(int, input().split()))
ans = 10 ** 9 + 1
for t in range(n):
	if not t:
		ans = min(a[t] // (n - 1 - t), ans)
		continue
	if t == n - 1:
		ans = min(a[t] // t, ans)
		continue
	ans = min(a[t] // (n - 1 - t), a[t] // t, ans)
print(ans)


n = int(input())
nums = [int(x) for x in input().split()]
answers = set()
for i in range(n):
	cur_num = nums[i]
	furthest = max(n - i - 1, i)
	answers.add(cur_num // furthest)
if answers != set():
	print(min(answers))
else:
	print(0)


import sys
import math
import collections
from pprint import pprint as pp
mod = 1000000007
MAX = 10 ** 10

def vector(size, val=0):
	vec = [val for i in range(size)]
	return vec

def matrix(rowNum, colNum, val=0):
	mat = []
	for i in range(rowNum):
		collumn = [val for j in range(colNum)]
		mat.append(collumn)
	return mat
(n, a) = (int(input()), list(map(int, input().split())))
ans = MAX
for i in range(n - 1):
	ans = min(ans, min(a[i], a[n - 1]) // (n - 1 - i))
for i in range(n - 1, 0, -1):
	ans = min(ans, min(a[i], a[0]) // i)
print(ans)


num = int(input())
array = [int(i) for i in input().split()]
mn = float('inf')
for i in range(1, num):
	mn = min(mn, min(array[0], array[i]) // i)
for i in range(num - 1):
	mn = min(mn, min(array[-1], array[i]) // (num - i - 1))
print(mn)


from math import inf
n = int(input())
nums = list(map(int, input().split()))
minimum = inf
for i in range(n):
	bot = max(i - 0, n - 1 - i)
	minimum = min(minimum, nums[i] // bot)
print(minimum)


from sys import stdin, stdout
a = int(stdin.readline())
z = list(map(int, stdin.readline().split()))
k = min(z)
r = int(1000000000.0)
i = 0
j = a - 1
while i <= j:
	r = min(r, z[i] // max(i, a - i - 1), z[j] // max(j, a - j - 1))
	i += 1
	j -= 1
stdout.write(str(r))


n = int(input())
m = list(map(int, input().split()))
k = 10 ** 9
for i in range(n):
	z = max(i, n - 1 - i)
	if z == i:
		k = min(k, min(m[i], m[z]) // i)
	else:
		k = min(k, min(m[i], m[z]) // (n - 1 - i))
print(k)


i = int(input())
a = list(map(int, input().strip().split()))
x = []
for j in range(i):
	x.append(a[j] / max(j, i - j - 1))
print(int(min(x)))


from sys import stdin
from math import gcd, sqrt
from collections import deque
input = stdin.readline
R = lambda : map(int, input().split())
I = lambda : int(input())
S = lambda : input().rstrip('\n')
hg = lambda x, y: (y + x - 1) // x * x
N = 10 ** 9 + 7
n = I()
ans = N
for (i, j) in enumerate(R()):
	ans = min(ans, j // max(i, n - i - 1))
print(ans)


N = int(input())
a = list(map(int, input().split()))
ans = float('inf')
for i in range(1, N + 1):
	if i != 1:
		ans = min(ans, min(a[i - 1], a[0]) / abs(i - 1))
	if i != N:
		ans = min(ans, min(a[i - 1], a[-1]) / abs(N - i))
print(int(ans))


n = int(input())
s = list(map(int, input().split()))
ex = 10 ** 9
for i in range(n):
	ex = min(ex, s[i] // max(i, n - i - 1))
print(ex)


def mp():
	return map(int, input().split())
n = int(input())
a = list(mp())
s = 10 ** 9
for i in range(n):
	s = min(s, a[i] // max(n - i - 1, i))
print(s)


n = int(input())
l = list(map(int, input().split()))
m = 100000000000000
for i in range(n):
	m = min(m, l[i] // max(i, n - i - 1))
print(m)


def main():
	n = int(input())
	arr = list(map(int, input().split()))
	ans = float('inf')
	for (i, val) in enumerate(arr):
		if i == 0:
			tmp = min(val, arr[n - 1]) // (n - i - 1)
		elif i == n - 1:
			tmp = min(val, arr[0]) // i
		else:
			tmp = min(min(val, arr[0]) // i, min(val, arr[n - 1]) // (n - i - 1))
		ans = min(ans, tmp)
	return ans
print(main())


def relax(ans, val_, dist_):
	if dist_ != 0:
		return min(ans, val_ // dist_)
	else:
		return ans

def solution(nums):
	uniq = list(set(nums))
	uniq.sort()
	poss = dict()
	for (pos, num) in enumerate(nums):
		if num not in poss:
			poss[num] = []
		poss[num].append(pos)
	for key in poss:
		poss[key].sort()
	ans = 1 << 30
	ans = relax(ans, uniq[-1], abs(poss[uniq[-1]][0] - poss[uniq[-1]][-1]))
	max_pos = poss[uniq[-1]][-1]
	min_pos = poss[uniq[-1]][0]
	for i in range(2, len(uniq) + 1):
		key = uniq[-i]
		max_dist = abs(poss[key][0] - poss[key][-1])
		for j in [-1, 0]:
			tmp = max(abs(poss[key][j] - max_pos), abs(poss[key][j] - min_pos))
			max_dist = max(max_dist, tmp)
		max_pos = max(max_pos, poss[key][-1])
		min_pos = min(min_pos, poss[key][0])
		ans = relax(ans, key, max_dist)
	return ans
n = int(input())
a = list(map(int, input().split()))
print(solution(a), end='')


n = int(input())
a = list(map(int, input().split()))
ans = 10000000000000
for i in range(n):
	try:
		ans = min(ans, min(a[i], a[0]) // i)
	except:
		pass
	try:
		ans = min(ans, min(a[i], a[-1]) // (n - 1 - i))
	except:
		pass
print(ans)


import sys, os
f = lambda : list(map(int, input().split()))
if 'local' in os.environ:
	sys.stdin = open('./input.txt', 'r')

def solve():
	n = f()[0]
	a = f()
	k = int(10000000000.0)
	for i in range(n - 1):
		k = min(k, min(a[i], a[n - 1]) // (n - 1 - i))
	for i in range(1, n):
		k = min(k, min(a[0], a[i]) // i)
	print(k)
solve()


n = int(input())
a = [int(x) for x in input().split()]
ans = 10 ** 12
for i in range(n):
	ans = min(ans, a[i] // max(i, n - 1 - i))
print(ans)


n = int(input())
l1 = list(map(int, input().split()))
for i in range(0, n):
	if i == 0:
		ans = l1[i] // (n - 1)
	else:
		x = max(n - 1 - i, i)
		ans = min(ans, l1[i] // x)
print(ans)


import sys
n = int(sys.stdin.readline().strip())
a = [int(item) for item in sys.stdin.readline().strip().split()]
k = float('inf')
for i in range(n):
	if i != n - 1:
		k = min(k, int(a[i] / (n - 1 - i)))
	if i:
		k = min(k, int(a[i] / i))
print(k)


N = int(input())
arr = input()
arr = [int(x) for x in arr.split(' ')]
res = 999999999999
for i in range(N):
	num = arr[i]
	d1 = i
	d2 = N - 1 - i
	res = min(res, num // max(d1, d2))
print(res)


n = int(input())
arr = list(map(int, input().split()))
res = float('inf')
for i in range(1, n):
	res = min(res, min(arr[i], arr[0]) // i)
for i in range(n - 1):
	res = min(res, min(arr[i], arr[n - 1]) // (n - 1 - i))
print(res)


n = int(input())
A = list(map(int, input().split(' ')))
max_k = -1
for (i, a) in enumerate(A):
	distance = max(i, n - 1 - i)
	if max_k == -1 or a // distance < max_k:
		max_k = a // distance
print(max_k)


n = int(input())
m = input().split()
for i in range(n):
	m[i] = int(m[i])
ans = 1000000000000
for i in range(n):
	dist = max(i, n - 1 - i)
	ans = min(ans, m[i] // dist)
print(ans)


n = int(input())
v = list(map(int, input().split()))
tiff = 0
fall = 0
tuh = 0
ti = 0
m = n - 1
tiff = min(v[0], v[n - 1]) // m
mini = min(v)
mdist = -5
for i in range(n):
	if mini == v[i]:
		mdist = max(mdist, i, n - 1 - i)
fall = mini // mdist
l = 999999999999999999
tuh = mini
t5 = 999999999999999999
for i in range(1, n - 1):
	tt1 = min(v[0], v[i]) // i
	tt2 = min(v[n - 1], v[i]) // (n - 1 - i)
	t5 = min(tt1, tt2, t5)
ans = max(min(tiff, fall, tuh, t5), 0)
print(ans)


import math
n = int(input())
arr = list(map(int, input().split()))
seen = set()
d = dict(zip(arr, range(n)))
(l, r) = (0, n - 1)
curr_min = math.inf
for k in sorted(d)[:n - 1]:
	pos = d[k]
	further_pos = []
	if pos != l:
		further_pos.append(abs(pos - l))
	if pos != r:
		further_pos.append(abs(r - pos))
	curr_min = min(curr_min, k // max(further_pos))
	if pos == l:
		seen.add(l)
		while l <= n - 1 and l in seen:
			l += 1
	if pos == r:
		seen.add(r)
		while r >= 0 and r in seen:
			r -= 1
print(curr_min)


sol = 10 ** 9
n = int(input())
a = list(map(int, input().split()))
i = 0
for j in a:
	sol = min(sol, j // max(i, n - i - 1))
	i += 1
print(sol)


n = int(input())
a = list(map(int, input().split()))
res = 10 ** 10
for i in range(n):
	if i != 0:
		res = min(res, int(min(a[i], a[0]) / i))
	if i != n - 1:
		res = min(res, int(min(a[i], a[n - 1]) / (n - i - 1)))
print(res)


n = int(input())
sk = [int(x) for x in input().split()]
ats = int(1000000000.0)
for i in range(n):
	ind = max(i, n - i - 1)
	ats = min(ats, sk[i] // ind)
print(ats)


input()
nums = list(map(int, input().split()))
sort = sorted(range(len(nums)), key=lambda i: nums[i])
k = None
for i in sort:
	le = max(i, len(nums) - i - 1)
	t = nums[i] // le
	if k is None or k > t:
		k = t
	if le + 1 == len(nums):
		break
print(k)


n = int(input())
arr = list(map(int, input().split()))
ans = []
pos = n // 2
for i in range(n):
	if i < pos:
		ans.append(arr[i] // (n - 1 - i))
	else:
		ans.append(arr[i] // i)
print(min(ans))


def main():
	n = int(input())
	a = [0] + [int(x) for x in input().split()]
	k = 10000000000.0
	for i in range(1, n // 2 + 1):
		if a[i] // (n - i) < k:
			k = a[i] // (n - i)
	for i in range(n // 2 + 1, n + 1):
		if a[i] // (i - 1) < k:
			k = a[i] // (i - 1)
	print(k)
main()


N = int(input())
a = list(map(int, input().split()))
ans = 10 ** 10
a0 = a[0]
for i in range(N - 1):
	ans = min(ans, min(a0, a[i + 1]) // (i + 1))
ar = a[-1]
for i in range(N - 1):
	ans = min(ans, min(ar, a[i]) // (N - i - 1))
print(ans)


import sys
from bisect import bisect_left, bisect_right, insort
from collections import deque, Counter
from math import gcd, sqrt, factorial, ceil, log10, log2, floor
from itertools import permutations
from heapq import heappush, heappop, heapify
inf = float('inf')
mod = 1000000007
sys.setrecursionlimit(10 ** 9)

def factorial_p(n, p):
	ans = 1
	if n <= p // 2:
		for i in range(1, n + 1):
			ans = ans * i % p
	else:
		for i in range(1, p - n):
			ans = ans * i % p
		ans = pow(ans, p - 2, p)
		if n % 2 == 0:
			ans = p - ans
	return ans

def nCr_p(n, r, p):
	ans = 1
	while n != 0 or r != 0:
		(a, b) = (n % p, r % p)
		if a < b:
			return 0
		ans = ans * factorial_p(a, p) * pow(factorial_p(b, p), p - 2, p) * pow(factorial_p(a - b, p), p - 2, p) % p
		n //= p
		r //= p
	return ans

def prime_sieve(n):
	flag = n % 6 == 2
	sieve = bytearray((n // 3 + flag >> 3) + 1)
	for i in range(1, int(n ** 0.5) // 3 + 1):
		if not sieve[i >> 3] >> (i & 7) & 1:
			k = 3 * i + 1 | 1
			for j in range(k * k // 3, n // 3 + flag, 2 * k):
				sieve[j >> 3] |= 1 << (j & 7)
			for j in range(k * (k - 2 * (i & 1) + 4) // 3, n // 3 + flag, 2 * k):
				sieve[j >> 3] |= 1 << (j & 7)
	return sieve

def prime_list(n):
	res = []
	if n > 1:
		res.append(2)
	if n > 2:
		res.append(3)
	if n > 4:
		sieve = prime_sieve(n + 1)
		res.extend((3 * i + 1 | 1 for i in range(1, (n + 1) // 3 + (n % 6 == 1)) if not sieve[i >> 3] >> (i & 7) & 1))
	return res

def is_prime(n):
	if n < 5 or n & 1 == 0 or n % 3 == 0:
		return 2 <= n <= 3
	s = (n - 1 & 1 - n).bit_length() - 1
	d = n >> s
	for a in [2, 325, 9375, 28178, 450775, 9780504, 1795265022]:
		p = pow(a, d, n)
		if p == 1 or p == n - 1 or a % n == 0:
			continue
		for _ in range(s):
			p = p * p % n
			if p == n - 1:
				break
		else:
			return False
	return True

def all_factors(n):
	(small, large) = ([], [])
	for i in range(1, int(n ** 0.5) + 1, 2 if n & 1 else 1):
		if not n % i:
			small.append(i)
			large.append(n // i)
	if small[-1] == large[-1]:
		large.pop()
	large.reverse()
	small.extend(large)
	return small

def dfs(r, c, mark, A):
	if r < 0 or r >= n or c < 0 or (c >= n):
		return
	if mat[r][c] == 1:
		return
	if mat[r][c] == mark:
		return
	mat[r][c] = mark
	A.append((r, c))
	for (x, y) in ((0, 1), (1, 0), (-1, 0), (0, -1)):
		dfs(r + x, c + y, mark, A)

def get_array():
	return list(map(int, sys.stdin.readline().strip().split()))

def get_ints():
	return map(int, sys.stdin.readline().strip().split())

def input():
	return sys.stdin.readline().strip()
n = int(input())
Arr = get_array()
mini = 10 ** 9 + 7
x = 0
y = n - 1
for i in range(1, n - 1):
	z1 = Arr[i] // abs(x - i)
	z2 = Arr[i] // abs(y - i)
	mini = min(z1, z2, mini)
z3 = Arr[0] // (n - 1)
z4 = Arr[n - 1] // (n - 1)
print(min(mini, z3, z4))


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def sort_list(list1, list2):
	zipped_pairs = zip(list2, list1)
	z = [x for (_, x) in sorted(zipped_pairs)]
	return z
n = int(input())
l = list(map(int, input().split()))
s = [i for i in range(n)]
s = sort_list(s, l)
l.sort()
for i in range(n):
	s[i] = l[i] // max(n - 1 - s[i], s[i])
print(min(s))


def main():
	from sys import stdin, stdout

	def read():
		return stdin.readline().rstrip('\n')

	def read_array(sep=None, maxsplit=-1):
		return read().split(sep, maxsplit)

	def read_int():
		return int(read())

	def read_int_array(sep=None, maxsplit=-1):
		return [int(a) for a in read_array(sep, maxsplit)]

	def write(*args, **kwargs):
		sep = kwargs.get('sep', ' ')
		end = kwargs.get('end', '\n')
		stdout.write(sep.join((str(a) for a in args)) + end)

	def write_array(array, **kwargs):
		sep = kwargs.get('sep', ' ')
		end = kwargs.get('end', '\n')
		stdout.write(sep.join((str(a) for a in array)) + end)
	n = read_int()
	nums = read_int_array()
	out = nums[0]
	first = nums[0]
	for i in range(1, n):
		out = min(out, min(nums[i], first) // i)
	last = nums[-1]
	for i in range(n - 2, 0, -1):
		out = min(out, min(nums[i], last) // (n - 1 - i))
	write(out)
main()


n = int(input().strip())
nums = [(int(i), index) for (index, i) in enumerate(input().strip().split())]
nums_sorted = sorted(nums)
ans = []
for i in range(n):
	(val, index) = nums_sorted[i]
	max_distance = max(n - index - 1, index)
	result = val // max_distance
	ans.append(result)
print(min(ans))


n = int(input())
m = 10000000
a = list(map(int, input().split()))
mark = [0 for _ in range(n)]
mark[0] = a[0] // (n - 1)
mark[n - 1] = a[n - 1] // (n - 1)
for i in range(1, n - 1):
	d = max(abs(i - 0), n - 1 - i)
	mark[i] = a[i] // d
print(min(mark))


from collections import *
from math import *
n = int(input())
a = list(map(int, input().split()))
k = 1e+18
for i in range(n):
	k = min(k, a[i] // max(i, n - i - 1))
print(k)


import math
from collections import defaultdict
import sys

def main():
	n = int(input())
	a = list(map(int, input().split()))
	res = math.inf
	for i in range(1, n + 1):
		res = min(res, a[i - 1] // max(i - 1, n - i))
	print(res)
main()


n = int(input())
a = [int(x) for x in input().split()]
b = []
counter = 10 ** 10
for i in range(n):
	b.append((a[i], i))
b.sort()
for item in b:
	counter = min(counter, item[0] // max(item[1], n - item[1] - 1))
print(counter)


n = int(input())
a = [int(s) for s in input().split()]
b = 0
c = 1000000000
b = c = d = a[0] // (n - 1)
for i in range(1, n):
	b = a[i] // i
	if n - i > 1:
		d = a[i] // (n - 1 - i)
	if c >= b:
		c = b
	if c >= d:
		c = d
print(c)


n = int(input())
ar = [int(x) for x in input().split()]
minn = 10 ** 9 + 1
for k in range(n):
	maxx = max(k, n - k - 1)
	minn = min(minn, ar[k] / maxx)
print(int(minn))


n = int(input())
l = list(map(int, input().split()))
b = 10 ** 9
for i in range(0, len(l)):
	b = min(b, l[i] / max(i, n - i - 1))
print(int(b))


import sys
input = sys.stdin.readline

def main():
	N = int(input())
	A = list(map(int, input().split()))
	K = 10 ** 14
	for (i, a) in enumerate(A):
		K = min(a // max(i, N - i - 1), K)
	print(K)
main()


n = int(input())
x = list(map(int, input().split()))
p = list((v // max(i, n - i - 1) for (i, v) in enumerate(x)))
print(min(p))


from os import path
import sys, time
from math import ceil, floor, gcd, log, log2, factorial
from collections import defaultdict, Counter, OrderedDict, deque
from itertools import combinations, groupby, zip_longest
from functools import reduce
from operator import mul
maxx = float('inf')
I = lambda : int(sys.stdin.buffer.readline())
tup = lambda : map(int, sys.stdin.buffer.readline().split())
lint = lambda : [int(x) for x in sys.stdin.buffer.readline().split()]
S = lambda : sys.stdin.readline().strip('\n')
grid = lambda r: [lint() for i in range(r)]
stpr = lambda x: sys.stdout.write(f'{x}' + '\n')
star = lambda x: print(' '.join(map(str, x)))
localsys = 0
start_time = time.time()
if path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
n = I()
ls = lint()
m = maxx
for (j, i) in enumerate(ls):
	m = min(m, i // max(j, n - j - 1))
print(m)
if localsys:
	print('\n\nTime Elased :', time.time() - start_time, 'seconds')


n = int(input())
A = list(map(int, input().split()))
b = 1000000000001
for i in range(n):
	b = min(b, A[i] / max(i, n - 1 - i))
print(int(b))


import math

def array_extension(n, a):
	result = float('inf')
	for (i, item) in enumerate(a):
		if i != 0:
			result = min(result, math.floor(item / i))
		if i != n - 1:
			result = min(result, math.floor(item / (n - 1 - i)))
	return result
n = int(input())
a = [int(item) for item in input().split()]
print(array_extension(n, a))


n = int(input())
array = list(map(int, input().strip().split(' ')))
k = 10000000000
for i in range(n):
	k = min(k, array[i] // max(i, n - 1 - i))
print(k)


from sys import stdin, stdout
from math import floor, gcd, fabs, factorial, fmod, sqrt, inf, log
from collections import defaultdict as dd, deque
from heapq import merge, heapify, heappop, heappush, nsmallest
from bisect import bisect_left as bl, bisect_right as br, bisect
mod = pow(10, 9) + 7
mod2 = 998244353

def inp():
	return stdin.readline().strip()

def iinp():
	return int(inp())

def out(var, end='\n'):
	stdout.write(str(var) + '\n')

def outa(*var, end='\n'):
	stdout.write(' '.join(map(str, var)) + end)

def lmp():
	return list(mp())

def mp():
	return map(int, inp().split())

def smp():
	return map(str, inp().split())

def l1d(n, val=0):
	return [val for i in range(n)]

def l2d(n, m, val=0):
	return [l1d(m, val) for j in range(n)]

def remadd(x, y):
	return 1 if x % y else 0

def ceil(a, b):
	return (a + b - 1) // b
S1 = 'abcdefghijklmnopqrstuvwxyz'
S2 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'

def isprime(x):
	if x <= 1:
		return False
	if x in (2, 3):
		return True
	if x % 2 == 0:
		return False
	for i in range(3, int(sqrt(x)) + 1, 2):
		if x % i == 0:
			return False
	return True
n = iinp()
arr = lmp()
(i, j) = (0, n - 1)
x = n - 1
k = inf
mn = inf
while i < j:
	mn = min(mn, arr[i], arr[j])
	k = min(k, mn // x)
	x -= 1
	i += 1
	j -= 1
print(k)


n = int(input())
a = list(map(int, input().split()))
mk = 1000000000.0
for i in range(1, n):
	mk = min(mk, a[i] / i)
for i in range(n - 1):
	mk = min(mk, a[i] / (n - 1 - i))
print(int(mk))