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.math.*;
import java.nio.Buffer;
import java.sql.SQLSyntaxErrorException;
import  java.util.*;
import  java.text.*;
import java.util.stream.Collectors;

public class Main {

    public  static  int c(int n,int m){
        int count=1;
        for(int i=1;i<=m;i++){
            count*=(n-i+1);
        }
        for(int i=2;i<=m;i++){
            count=count/i;
        }
        return count;
    }
    public static void reset(){
        System.out.println("R");
    }
    public  static boolean query(int x){
        Scanner cin = new Scanner(System.in);
        System.out.printf("? %d\n",x+1);
        String str=cin.next();
        char s[]=str.toCharArray();
        if(s[0]=='Y'){
            return true;
        }
        else{
            return false;
        }
    }
    public  static long dis(long x,long y,long x1,long y1){
        return Math.abs(x-x1)+Math.abs(y-y1);
    }
    static final char[] VALUES = { 'S', 'E', 'T' };

    static int[][][][]dp=new int[105][100][100][2];
    static int []num;
    static int MOD = 1000000007;

    public static long bigMod(long n,long k,long p){
        long ans=1;
        while(k>0){
            if((k&1)==1){
                ans=(ans*n)%p;
            }
            n=(n*n)%p;
            k=k>>1;
        }
        return ans;
    }
    public static int n,m;
    private static boolean can(int k) {
        int e = m-1;
        for (int i = n-1;i >= 0;i--) {
            if (num[i] <= e) {
                int d = Math.min(k,e - num[i]);
                e = num[i] + d;
            }
            else {
                int nu = m-num[i];
                if (nu > k) return false;
                nu += e;
                int d = Math.min(nu,k);
                e = (num[i] + d)%m;
            }
        }
        return true;
    }
    public  static double PI=Math.atan(1.0)*4;
    public static void main(String[] args) {
        Scanner cin = new Scanner(System.in);
        /*int T=cin.nextInt();
        while(T-->0){
            String str=cin.next();
            char s[]=str.toCharArray();
            int sum=0;
            int m=1;
            for(int i=s.length-1;i>=0;i--){

                if(s[i]>='0'&&s[i]<='9'){
                    sum+=m*(s[i]-'0');
                }
                else if(s[i]>='A'&&s[i]<='Z'){
                    sum+=m*(s[i]-'A'+10);
                }
                m=m*16;
            }
           // System.out.println(sum);
            StringBuilder st=new StringBuilder();
            while(sum>0){
                char x=(char)(sum%8+'0');
                st.append(x);
                sum=sum/8;

            }
            String m1=st.toString();
            System.out.println(new StringBuffer(m1).reverse().toString());

        }*/
        int n=cin.nextInt();
        int num[]=new int[n];
        for(int i=0;i<n;i++){
            num[i]=cin.nextInt();
        }
        int ant=Integer.MAX_VALUE;
        for(int i=0;i<n;i++){
            if(i!=n-1){
                int min=Math.min(num[i],num[n-1]);
                int val=min/Math.abs(i-n+1);
                ant=Math.min(val,ant);
            }
            if(i!=0){
                int mi=Math.min(num[0],num[i]);
                int val =mi/Math.abs(i-0);
                ant=Math.min(val,ant);
            }
        }
        System.out.println(ant);

    }
    public  static int slove(int idx,int odd,int even,int lst){
            if(odd<0||even<0){
                return Integer.MAX_VALUE;
            }
            if(idx==num.length){
                return 0;
            }
            if(dp[idx][odd][even][lst]!=0){
                return dp[idx][odd][even][lst];
            }
            int res=Integer.MAX_VALUE;
            if(num[idx]!=0){
                res=slove(idx+1,odd,even,num[idx]%2);
                res+=num[idx]%2==lst?0:1;
                dp[idx][odd][even][lst]=res;
            }
            else{
                res=slove(idx+1,odd-1,even,0);
                int r=slove(idx+1,odd,even-1,1);
                if(res!=Integer.MAX_VALUE)res+= lst==0?0:1;
                if(r!=Integer.MAX_VALUE) r+= lst==0?1:0;
                dp[idx][odd][even][lst]=Math.min(res, r);
            }
            return dp[idx][odd][even][lst];
        }
    public static String compute(String x,String y){
        StringBuilder result=new StringBuilder();
        for(int i=0;i<x.length();i++){
            char a=x.charAt(i);
            char b=y.charAt(i);

            char ch;
            if(a==b){
                ch=a;
            }
            else{
                for(int j=0;;j++){
                    if(VALUES[j]!=a&&VALUES[j]!=b){
                        ch=VALUES[j];
                        break;
                    }
                }
            }
            result.append(ch);
        }
        return result.toString();

    }
    }

	    		 	 					 						 	  	 			