#include <bits/stdc++.h>
using namespace std;
const int MAX = 300010;
long long tree1[2 * MAX];
long long tree2[2 * MAX];
int N;
int H = sizeof(int) * 8 - __builtin_clz(N);
long long op1(long long a, long long b) { return min(a, b); }
void build1(long long A[]) {
  for (int i = 0; i < N; ++i) tree1[N + i] = A[i];
  for (int i = N - 1; i > 0; --i)
    tree1[i] = op1(tree1[(i << 1)], tree1[(i << 1) | 1]);
}
long long query1(int l, int r) {
  l += N, r += N + 1;
  long long res = 1e18;
  for (; l < r; l >>= 1, r >>= 1) {
    if (l & 1) res = op1(res, tree1[l++]);
    if (r & 1) res = op1(res, tree1[--r]);
  }
  return res;
}
long long op2(long long a, long long b) { return max(a, b); }
void build2(long long A[]) {
  for (int i = 0; i < N; ++i) tree2[N + i] = A[i];
  for (int i = N - 1; i > 0; --i)
    tree2[i] = op2(tree2[(i << 1)], tree2[(i << 1) | 1]);
}
long long query2(int l, int r) {
  l += N, r += N + 1;
  long long res = 0;
  for (; l < r; l >>= 1, r >>= 1) {
    if (l & 1) res = op2(res, tree2[l++]);
    if (r & 1) res = op2(res, tree2[--r]);
  }
  return res;
}
int main() {
  ios::sync_with_stdio(false);
  cin >> N;
  pair<long long, long long> A[N];
  for (int i = 0; i < N; ++i) {
    cin >> A[i].first;
    A[i].second = i;
  }
  sort(A, A + N);
  long long B[N];
  for (int i = 0; i < N; ++i) B[i] = A[i].second;
  build1(B);
  build2(B);
  long long k = 1e18;
  for (int i = 0; i < N - 1; ++i)
    k = min(k, A[i].first / max(llabs(A[i].second - query1(i + 1, N - 1)),
                                llabs(A[i].second - query2(i + 1, N - 1))));
  if (k == 1e18) k = 0;
  cout << k << endl;
  return 0;
}
