Let's call an array of non-negative integers a_1, a_2, …, a_n a k-extension for some non-negative integer k if for all possible pairs of indices 1 ≤ i, j ≤ n the inequality k ⋅ |i - j| ≤ 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, …, a_n. Find its expansion coefficient.

Input

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

Output

Print one non-negative integer — expansion coefficient of the array a_1, a_2, …, 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| ≤ min(a_i, a_j), because all elements of the array satisfy a_i ≥ 3. On the other hand, this array isn't a 2-extension, because 6 = 2 ⋅ |1 - 4| ≤ 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.
import java.io.*;
import java.util.*;

public class tr1 {
	static PrintWriter out;
	static StringBuilder sb;
	static int inf = (int) 1e9;
	static long mod = 998244353;
	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		out = new PrintWriter(System.out);
		int n=sc.nextInt();
		int []a=new int [n];
		for(int i=0;i<n;i++)
			a[i]=sc.nextInt();
		//TreeMap<Integer,Integer> t=new TreeMap<>();
		int ans=Integer.MAX_VALUE;
		for(int i=0;i<n;i++) {
			int d=Math.max(i, n-i-1);
		//	System.out.println(d);
			ans=Math.min(a[i]/d, ans);
		}
		out.println(ans);
		out.flush();
	}
	static public class segmentTree{
		int [] array,tree,lazy;
		int n;
		segmentTree(int []aa){
			array=aa;
			n=array.length-1;
			tree=new int [n*4];
			lazy=new int[n*4];
			Arrays.fill(lazy, -1);
			build(1,1,n);
		}
		public String toString() {
			return Arrays.toString(tree);
		}
		void build(int node,int l,int r) {
			if(l==r)
				tree[node]=array[r];
			else {
				int mid=(l+r)>>1;
				build(node<<1,l,mid);
				build((node<<1)|1,mid+1,r);
				tree[node]=tree[node<<1]+tree[node<<1|1];
			}
		}
		void updateRange(int i,int j,int v) {
			updateR(1,1,n,i,j,v);
		}
		void updateR(int node,int l,int r,int i,int j,int v) {
			if(i>r || j<l)
				return;
			if(i<= l && j>=r) {
				tree[node] = (r-l+1)*v;			
				lazy[node] = v;
			}
			else {
				int mid=l+r>>1;
			propagate(node, l, mid, r);
			updateR(node<<1,l,mid,i,j,v);
			updateR(node<<1|1,mid+1,r,i,j,v);
			tree[node] = tree[node<<1] + tree[node<<1|1];
			}
		}
		void propagate(int node, int b, int mid, int e)		
		{
			if(lazy[node]!=-1) {
			lazy[node<<1] = lazy[node];
			lazy[node<<1|1] = lazy[node];
			tree[node<<1] = (mid-b+1)*lazy[node];		
			tree[node<<1|1] = (e-mid)*lazy[node];
			}
			lazy[node] = -1;
		}
		int query(int i, int j)
		{
			return query(1,1,n,i,j);
		}
		
		int query(int node, int b, int e, int i, int j)	// O(log n)
		{
			if(i>e || j <b)
				return 0;		
			if(b>= i && e <= j)
				return tree[node];
			int mid = b + e >> 1;
			propagate(node, b, mid, e);
			int q1 = query(node<<1,b,mid,i,j);
			int q2 = query(node<<1|1,mid+1,e,i,j);
			return q1 + q2;	
					
		}
		
	}
	static class pair2 implements Comparable<pair2>{
		int x;
		int y;
		pair2(int x,int y){
			this.x=x;
			this.y=y;
		}
		public String toString() {
			return x+" "+y;
		}
		@Override
		public int compareTo(pair2 o) {
		//	if(o.x==x)
				return o.y-y; 
			//return o.x-x;
		}
	}
	static class pair implements Comparable<pair>{
		int x;
		int y;
		pair(int x,int y){
			this.x=x;
			this.y=y;
		}
		public String toString() {
			return x+" "+y;
		}
		@Override
		public int compareTo(pair o) {
			if(o.x==x)
				return o.y-y; 
			return o.x-x;
		}
	}
	static HashSet<Integer> re;
	static int c;
	static int gcd(int a, int b) {

		if (b == 0) {
			return a;
		}
		return gcd(b, a % b);
	}

	static class unionfind {
		int[] p;
		int[] size;

		unionfind(int n) {
			p = new int[n];
			size = new int[n];

			for (int i = 0; i < n; i++) {
				p[i] = i;
			}
			Arrays.fill(size, 1);
		}

		int findSet(int v) {
			if (v == p[v])
				return v;
			return p[v] = findSet(p[v]);
		}

		boolean sameSet(int a, int b) {
			a = findSet(a);
			b = findSet(b);
			if (a == b)
				return true;
			return false;
		}

		int max() {
			int max = 0;
			for (int i = 0; i < size.length; i++)
				if (size[i] > max)
					max = size[i];
			return max;
		}

		void combine(int a, int b) {
			a = findSet(a);
			b = findSet(b);
			if (a == b)
				return;
			if (size[a] > size[b]) {
				p[b] = a;
				size[a] += size[b];

			} else {
				p[a] = b;
				size[b] += size[a];
			}
		}
	}

	static class Scanner {
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream system) {
			br = new BufferedReader(new InputStreamReader(system));
		}

		public Scanner(String file) throws Exception {
			br = new BufferedReader(new FileReader(file));
		}

		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public String nextLine() throws IOException {
			return br.readLine();
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		public double nextDouble() throws IOException {
			return Double.parseDouble(next());
		}

		public char nextChar() throws IOException {
			return next().charAt(0);
		}

		public Long nextLong() throws IOException {
			return Long.parseLong(next());
		}

		public boolean ready() throws IOException {
			return br.ready();
		}

		public void waitForInput() throws InterruptedException {
			Thread.sleep(3000);
		}
	}
}