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.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.StringTokenizer;
import java.util.TreeSet;

public class B {
	static FastReader scan = new FastReader();
	static PrintWriter out = new PrintWriter(System.out);

	public static void main(String[] args) {
		Solver solver = new Solver();
		int testCases = 1;
		while (testCases--> 0) solver.solve();
		out.close();
	}

	static class Solver {
		
		void solve() {
			int n = scan.nextInt();
			Number[] a = new Number[n];
			TreeSet<Integer> t = new TreeSet<>();
			for(int i = 0; i < n; i++) {
				a[i] = new Number(scan.nextInt(), i);
				t.add(i);
			}
			Arrays.sort(a);
			int k = Integer.MAX_VALUE;
			for(int i = 0; i < n-1; i++) {
				t.remove(new Integer(a[i].index));
				Integer high = t.first();
				Integer low = t.last();
				int aa = Math.abs(a[i].index - high), bb = Math.abs(a[i].index - low);
				if(aa > bb) {
					k = Math.min(k, a[i].val/aa);
				}
				else k = Math.min(k, a[i].val/bb);
			}
			out.println(k);
		}
		
		static class Number implements Comparable<Number>{
			int val;
			int index;
			
			public Number(int a, int b) {
				val = a;
				index = b;
			}

			@Override
			public int compareTo(Number o) {
				return Integer.compare(val, o.val);
			}
		}
	}
	
	//Sathvik's Template Stuff BELOW!!!!!!!!!!!!!!!!!!!!!!
	
	
	static class DSU {
		int[] root, size;
		int n;
		DSU(int n) {
			this.n = n;
			root = new int[n];
			size = new int[n];
			for(int i = 0; i < n; i++) {
				root[i] = i;
				size[i] = 1;
			}
		}
		int findParent(int idx) {
			while(root[idx] != idx) {
				root[idx] = root[root[idx]];
				idx = root[idx];
			}
			return idx;
		}	
		boolean union(int x, int y) {
			int parX = findParent(x);
			int parY = findParent(y);
			if(parX == parY) return false;
			if(size[parX] < size[parY]) {
				root[parY] = parX;
				size[parX] += size[parY];
			} else {
				root[parX] = parY;
				size[parY] += size[parX]; 
			}
			return true;
		}
	}

	static class Extra {
		static void sort(int[] a) {
			Integer[] aa = new Integer[a.length];
			for (int i = 0; i < aa.length; i++) aa[i] = a[i];
			Arrays.sort(aa);
			for (int i = 0; i < aa.length; i++) a[i] = aa[i];
		}
		static void sort(long[] a) {
			Long[] aa = new Long[a.length];
			for (int i = 0; i < aa.length; i++) aa[i] = a[i];
			Arrays.sort(aa);
			for (int i = 0; i < aa.length; i++) a[i] = aa[i];
		}
		static void sort(double[] a) {
			Double[] aa = new Double[a.length];
			for (int i = 0; i < aa.length; i++) aa[i] = a[i];
			Arrays.sort(aa);
			for (int i = 0; i < aa.length; i++) a[i] = aa[i];
		}
		static void sort(char[] a) {
			Character[] aa = new Character[a.length];
			for (int i = 0; i < aa.length; i++) aa[i] = a[i];
			Arrays.sort(aa);
			for (int i = 0; i < aa.length; i++) a[i] = aa[i];
		}
		static long gcd(long a, long b) {
			while(b > 0) {
				long temp = b;
				b = a%b;
				a = temp;
			}
			return a;
		}
		static long lcm(long a, long b) {
			return a * (b / gcd(a,b));
		}
		static boolean isPrime(long n) {
			if (n <= 1) return false; 
	        if (n <= 3) return true; 
	        if (n % 2 == 0 || n % 3 == 0) return false; 
	        for (long i = 5; i * i <= n; i = i + 6) { 
	            if (n % i == 0 || n % (i + 2) == 0) return false; 
	        }
	        return true;
		}
		static HashSet<Integer> sieve(int n) {
			boolean[] prime = new boolean[n+1];
			HashSet<Integer> res = new HashSet<>();
			for(int p = 2; p*p <= n; p++) {
				if(!prime[p]) {
					res.add(p);
					for(int i = p*p; i <= n; i+=p) prime[i] = true;
				}
			}
			return res;
		}
		static HashMap<Long, Integer> primeFactorization(long n) {
			HashMap<Long, Integer> res = new HashMap<>();
			while(n % 2 == 0) {
				res.put(2L, res.getOrDefault(2L, 0)+1);
				n/=2;
			}
			for(long i = 3; i*i <= n; i+=2) {
				while(n % i == 0) {
					res.put(i, res.getOrDefault(i, 0)+1);
					n/=i;
				}
			}
			if(n > 2) res.put(n, 1);
			return res;
		}
	}

	static class FastReader {
		BufferedReader br;
		StringTokenizer st;

		public FastReader() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		String next() {
			while (st == null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

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

		int[] nextIntArray(int n) {
			int[] a = new int[n];
			for (int i = 0; i < n; i++)
				a[i] = nextInt();
			return a;
		}

		long nextLong() {
			return Long.parseLong(next());
		}

		long[] nextLongArray(int n) {
			long[] a = new long[n];
			for (int i = 0; i < n; i++)
				a[i] = nextLong();
			return a;
		}

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

		double[] nextDoubleArray(int n) {
			double[] a = new double[n];
			for (int i = 0; i < n; i++)
				a[i] = nextDouble();
			return a;
		}

		String nextLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}
			return str;
		}
	}
	
	
}