#include <bits/stdc++.h>
using namespace std;
const long double eps = 1e-9;
const int maxn = (int)3e5 + 5;
const long long mod = (int)1e9 + 7;
int a[maxn], b[maxn];
int abi[maxn], res[maxn];
void upd(bool f, int p, int v) {
  for (; p; p -= p & -p) {
    if (f)
      abi[p] = min(abi[p], v);
    else
      abi[p] = max(abi[p], v);
  }
}
int query(bool f, int p) {
  int ans;
  if (f)
    ans = INT_MAX;
  else
    ans = 0;
  for (; p < maxn; p += p & -p) {
    if (f)
      ans = min(ans, abi[p]);
    else
      ans = max(ans, abi[p]);
  }
  return ans;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.setf(ios::fixed);
  cout.precision(0);
  int n;
  cin >> n;
  vector<int> aux;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    b[i] = a[i];
    aux.push_back(a[i]);
  }
  sort(aux.begin(), aux.end());
  aux.erase(unique(aux.begin(), aux.end()), aux.end());
  int ans = INT_MAX;
  for (int i = 1; i <= n; i++) {
    a[i] = lower_bound(aux.begin(), aux.end(), a[i]) - aux.begin();
    a[i]++;
  }
  fill(res + 1, res + n + 1, INT_MAX);
  fill(abi + 1, abi + maxn, INT_MAX);
  for (int i = 1; i <= n; i++) {
    int j = query(1, a[i]);
    upd(1, a[i], i);
    if (j < i) ans = min(ans, b[i] / (i - j));
  }
  fill(abi + 1, abi + maxn, 0);
  for (int i = n; i >= 1; i--) {
    int j = query(0, a[i]);
    upd(0, a[i], i);
    if (j > i) ans = min(ans, b[i] / (j - i));
  }
  cout << ans;
  return 0;
}
