import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Set;
import java.util.StringTokenizer;
import java.util.TreeSet;

public class KSN {

	static PrintWriter out = new PrintWriter(System.out);

	static void input() throws IOException {
		Reader.init(System.in);
		Reader.delimiter = " ";
	}

	public static void main(String[] args) throws IOException {
		// TODO Auto-generated method stub

		input();
		solve();
	}

	static void solve() throws IOException {

		int n = Reader.nextInt();
		int k = Reader.nextInt();
		int q = Reader.nextInt();

		Set<Integer> myset = new TreeSet<>();

		int[] importance = Reader.nextIntArray(n);

		int[][] queries = new int[q][2];

		int min = Integer.MAX_VALUE;

		for (int i = 0; i < q; ++i) {

			queries[i][0] = Reader.nextInt();
			queries[i][1] = Reader.nextInt();

			int index = queries[i][1] - 1;

			if (queries[i][0] == 1) {

				int val = importance[index];

				min = Math.min(min, val);

				if (myset.size() < k) {
					myset.add(val);
				}

				else if (val > min) {
					myset.remove(min);
					myset.add(val);

				}

			}

			else {

				if (myset.contains(importance[index]))
					out.println("YES");

				else
					out.println("NO");
			}

		}

		out.flush();
		out.close();

	}

	static class Reader {

		static BufferedReader reader;
		static StringTokenizer tokenizer;
		static String delimiter = " ";

		static void init(InputStream input) {
			reader = new BufferedReader(new InputStreamReader(input));
			tokenizer = new StringTokenizer(" ");
		}

		static String next() throws IOException {
			while (tokenizer == null || !tokenizer.hasMoreTokens()) {

				tokenizer = new StringTokenizer(reader.readLine());
			}
			return tokenizer.nextToken(delimiter);
		}

		static String nextLine() throws IOException {
			return reader.readLine();
		}

		static char nextChar() throws IOException {
			return (char) reader.read();
		}

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

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

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

		static long[] nextLongArray(int n) throws IOException {
			long[] arr = new long[n];
			for (int i = 0; i < n; i++) {
				arr[i] = nextLong();
			}

			return arr;
		}

		static int[] nextIntArray(int n) throws IOException {
			int[] arr = new int[n];
			for (int i = 0; i < n; i++) {
				arr[i] = nextInt();
			}
			return arr;
		}

	}

}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Iterator;
import java.util.Set;
import java.util.StringTokenizer;
import java.util.TreeSet;

public class KSN {

	static PrintWriter out = new PrintWriter(System.out);

	static void input() throws IOException {
		Reader.init(System.in);
		Reader.delimiter = " ";
	}

	public static void main(String[] args) throws IOException {
		// TODO Auto-generated method stub

		input();
		solve();
	}

	static void solve() throws IOException {

		int n = Reader.nextInt();
		int k = Reader.nextInt();
		int q = Reader.nextInt();

		Set<Integer> myset = new TreeSet<>();

		int[] importance = Reader.nextIntArray(n);

		int[][] queries = new int[q][2];

		int min = Integer.MAX_VALUE;

		for (int i = 0; i < q; ++i) {

			queries[i][0] = Reader.nextInt();
			queries[i][1] = Reader.nextInt();

			int index = queries[i][1] - 1;

			if (queries[i][0] == 1) {

				int val = importance[index];

				Iterator<Integer> it = myset.iterator();
				while (it.hasNext())
					min = Math.min(min, it.next());

				if (myset.size() < k) {
					myset.add(val);
				}

				else if (val > min) {
					myset.remove(min);
					myset.add(val);

				}

			}

			else {

				if (myset.contains(importance[index]))
					out.println("YES");

				else
					out.println("NO");
			}

		}

		out.flush();
		out.close();

	}

	static class Reader {

		static BufferedReader reader;
		static StringTokenizer tokenizer;
		static String delimiter = " ";

		static void init(InputStream input) {
			reader = new BufferedReader(new InputStreamReader(input));
			tokenizer = new StringTokenizer(" ");
		}

		static String next() throws IOException {
			while (tokenizer == null || !tokenizer.hasMoreTokens()) {

				tokenizer = new StringTokenizer(reader.readLine());
			}
			return tokenizer.nextToken(delimiter);
		}

		static String nextLine() throws IOException {
			return reader.readLine();
		}

		static char nextChar() throws IOException {
			return (char) reader.read();
		}

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

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

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

		static long[] nextLongArray(int n) throws IOException {
			long[] arr = new long[n];
			for (int i = 0; i < n; i++) {
				arr[i] = nextLong();
			}

			return arr;
		}

		static int[] nextIntArray(int n) throws IOException {
			int[] arr = new int[n];
			for (int i = 0; i < n; i++) {
				arr[i] = nextInt();
			}
			return arr;
		}

	}

}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class KSN {

	static PrintWriter out = new PrintWriter(System.out);

	static void input() throws IOException {
		Reader.init(System.in);
		Reader.delimiter = " ";
	}

	public static void main(String[] args) throws IOException {
		// TODO Auto-generated method stub

		input();
		solve();
	}

	static void solve() throws IOException {

		int n = Reader.nextInt();
		int k = Reader.nextInt();
		int q = Reader.nextInt();

		int[] p_queue = new int[7];

		boolean[] online = new boolean[150000];

		int[] importance = Reader.nextIntArray(n);

		int[][] queries = new int[q][2];

		int curIndex = 0, size = 0;

		for (int i = 0; i < q; ++i) {
			queries[i][0] = Reader.nextInt();
			queries[i][1] = Reader.nextInt();

			curIndex = size;

			online[p_queue[k]] = false;

			int index = queries[i][1] - 1;

			if (queries[i][0] == 1) {

				int val = importance[index];

				if (val > importance[p_queue[curIndex]] || size <= k) {

					while (curIndex > 0 && val > importance[p_queue[curIndex - 1]]) {
						p_queue[curIndex] = p_queue[curIndex - 1];
						curIndex--;
					}

					p_queue[curIndex] = index;

					online[index] = true;

					if (size != k)
						size++;

				}
			} else {
				if (online[index])
					out.println("YES");

				else
					out.println("NO");
			}

		}

		out.flush();
		out.close();

	}

	static class Reader {

		static BufferedReader reader;
		static StringTokenizer tokenizer;
		static String delimiter = " ";

		static void init(InputStream input) {
			reader = new BufferedReader(new InputStreamReader(input));
			tokenizer = new StringTokenizer(" ");
		}

		static String next() throws IOException {
			while (tokenizer == null || !tokenizer.hasMoreTokens()) {

				tokenizer = new StringTokenizer(reader.readLine());
			}
			return tokenizer.nextToken(delimiter);
		}

		static String nextLine() throws IOException {
			return reader.readLine();
		}

		static char nextChar() throws IOException {
			return (char) reader.read();
		}

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

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

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

		static long[] nextLongArray(int n) throws IOException {
			long[] arr = new long[n];
			for (int i = 0; i < n; i++) {
				arr[i] = nextLong();
			}

			return arr;
		}

		static int[] nextIntArray(int n) throws IOException {
			int[] arr = new int[n];
			for (int i = 0; i < n; i++) {
				arr[i] = nextInt();
			}
			return arr;
		}

	}

}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class KSN {

	static PrintWriter out = new PrintWriter(System.out);

	static void input() throws IOException {
		Reader.init(System.in);
		Reader.delimiter = " ";
	}

	public static void main(String[] args) throws IOException {
		// TODO Auto-generated method stub

		input();
		solve();
	}

	static void solve() throws IOException {

		int n = Reader.nextInt();
		int k = Reader.nextInt();
		int q = Reader.nextInt();

		int[] p_queue = new int[k + 1];

		boolean[] online = new boolean[(int) 1e6];

		int[] importance = Reader.nextIntArray(n);

		int[][] queries = new int[q][2];

		int curIndex = 0, size = 0;

		for (int i = 0; i < q; ++i) {
			queries[i][0] = Reader.nextInt();
			queries[i][1] = Reader.nextInt();

			curIndex = size;

			online[p_queue[k]] = false;

			int index = queries[i][1] - 1;

			if (queries[i][0] == 1) {

				int val = importance[index];

				if ((curIndex > 0 && val > importance[p_queue[curIndex - 1]]) || size <= k) {

					while (curIndex > 0 && val > importance[p_queue[curIndex - 1]]) {
						p_queue[curIndex] = p_queue[curIndex - 1];
						curIndex--;
					}

					p_queue[curIndex] = index;

					online[index] = true;

					if (size < k)
						size++;

				}

			}

			else {

				if (online[index])
					out.println("YES");

				else
					out.println("NO");
			}

		}

		out.flush();
		out.close();

	}

	static class Reader {

		static BufferedReader reader;
		static StringTokenizer tokenizer;
		static String delimiter = " ";

		static void init(InputStream input) {
			reader = new BufferedReader(new InputStreamReader(input));
			tokenizer = new StringTokenizer(" ");
		}

		static String next() throws IOException {
			while (tokenizer == null || !tokenizer.hasMoreTokens()) {

				tokenizer = new StringTokenizer(reader.readLine());
			}
			return tokenizer.nextToken(delimiter);
		}

		static String nextLine() throws IOException {
			return reader.readLine();
		}

		static char nextChar() throws IOException {
			return (char) reader.read();
		}

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

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

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

		static long[] nextLongArray(int n) throws IOException {
			long[] arr = new long[n];
			for (int i = 0; i < n; i++) {
				arr[i] = nextLong();
			}

			return arr;
		}

		static int[] nextIntArray(int n) throws IOException {
			int[] arr = new int[n];
			for (int i = 0; i < n; i++) {
				arr[i] = nextInt();
			}
			return arr;
		}

	}

}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Iterator;
import java.util.Set;
import java.util.StringTokenizer;
import java.util.TreeSet;

public class KSN {

	static PrintWriter out = new PrintWriter(System.out);

	static void input() throws IOException {
		Reader.init(System.in);
		Reader.delimiter = " ";
	}

	public static void main(String[] args) throws IOException {
		// TODO Auto-generated method stub

		input();
		solve();
	}

	static void solve() throws IOException {

		int n = Reader.nextInt();
		int k = Reader.nextInt();
		int q = Reader.nextInt();

		Set<Integer> myset = new TreeSet<>();

		int[] importance = Reader.nextIntArray(n);

		int[][] queries = new int[q][2];

		int min = Integer.MAX_VALUE;

		for (int i = 0; i < q; ++i) {

			queries[i][0] = Reader.nextInt();
			queries[i][1] = Reader.nextInt();

			int index = queries[i][1] - 1;

			if (queries[i][0] == 1) {

				int val = importance[index];

				Iterator<Integer> it = myset.iterator();
				while (it.hasNext())
					min = Math.min(min, val);

				if (myset.size() < k) {
					myset.add(val);
				}

				else if (val > min) {
					myset.remove(min);
					myset.add(val);

				}

			}

			else {

				if (myset.contains(importance[index]))
					out.println("YES");

				else
					out.println("NO");
			}

		}

		out.flush();
		out.close();

	}

	static class Reader {

		static BufferedReader reader;
		static StringTokenizer tokenizer;
		static String delimiter = " ";

		static void init(InputStream input) {
			reader = new BufferedReader(new InputStreamReader(input));
			tokenizer = new StringTokenizer(" ");
		}

		static String next() throws IOException {
			while (tokenizer == null || !tokenizer.hasMoreTokens()) {

				tokenizer = new StringTokenizer(reader.readLine());
			}
			return tokenizer.nextToken(delimiter);
		}

		static String nextLine() throws IOException {
			return reader.readLine();
		}

		static char nextChar() throws IOException {
			return (char) reader.read();
		}

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

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

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

		static long[] nextLongArray(int n) throws IOException {
			long[] arr = new long[n];
			for (int i = 0; i < n; i++) {
				arr[i] = nextLong();
			}

			return arr;
		}

		static int[] nextIntArray(int n) throws IOException {
			int[] arr = new int[n];
			for (int i = 0; i < n; i++) {
				arr[i] = nextInt();
			}
			return arr;
		}

	}

}


import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
public class Ideone
{
	public static void main (String[] args) throws java.lang.Exception
	{

		// your code goes here
	Scanner sc=new Scanner(System.in);
		int n,k,q;

		n=sc.nextInt();
		k=sc.nextInt();
		q=sc.nextInt();

		int arr[]=new int[n+1];
		//int k=Math.min(6,n);
		int disp[]=new int[k];
		for(int i=1;i<n+1;i++){
			//arr[i]=new Pair();
			arr[i]=sc.nextInt();
			//arr[i].in=i+1;
		}

		int j=0;

		int counter=1;
		for(int i=0;i<q;i++){

			int c=sc.nextInt();
			if(c==1)
			{
				int en=sc.nextInt();
				if(j<k)
				{

					disp[j]=arr[en];
				     j++;
				}
				else{

				//if(counter==1)

	                	Arrays.sort(disp);
	                //    counter=2;

	                 if(disp[0]<arr[en])
	                 	disp[0]=arr[en];
	                 else
	                 	continue;

				}

			}
			else{
				int en=sc.nextInt(),fl=0;
				for(int l=0;l<k;l++){
					if(disp[l]==arr[en]){
						System.out.println("YES");
						fl=1;
						break;
					}

				}
				if(fl==0)
					System.out.println("NO");
			}
		}

	}
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Comparator;
import java.util.PriorityQueue;

public class Round1B {
	public static void main(String[] args) throws IOException {
		BufferedReader f = new BufferedReader(new InputStreamReader(System.in));
		PrintWriter out = new PrintWriter(System.out);
		String[] split = f.readLine().split(" ");
		int n = Integer.parseInt(split[0]), q = Integer.parseInt(split[2]), k = Math.min(6, Integer.parseInt(split[1]));

		friend[] a = new friend[n];
		int[] t = new int[n]; split = f.readLine().split(" "); for(int i = 0; i < n; i++) t[i] = Integer.parseInt(split[i]);
		for(int i = 0; i < n; i++) {
			a[i] = new friend(i, t[i]);
		}
		PriorityQueue<friend> c = new PriorityQueue<friend>();
		boolean[] on = new boolean[n];
		int curMin = Integer.MAX_VALUE, curK = 0, largest = Integer.MIN_VALUE;
		for(int i = 0; i < q; i++) {

//			out.println(c.toString());

			//			out.println("i:" + i);
			split = f.readLine().split(" ");
			int op = Integer.parseInt(split[0]), num = Integer.parseInt(split[1])-1;
			//			out.println(t[num]);
			if(!on[num] && op==2) {
				//				out.println("1");
				out.println("NO");
				continue;
			}
			if(!on[num] && op==1 && curK < k) {
				//				out.println("2");
				on[num] = true;
				c.add(a[num]);
				largest = Math.max(largest, t[num]);
				curK++;
				continue;
			}
			if(!on[num] && op==1 && curK==k) {
//				out.println("3");
				if(c.size()==0 || a[num].v > c.peek().v) {
//					out.println("a");
					int l = c.poll().id;
					on[l] = false;
					c.add(a[num]);
					on[num] = true;
				}
			}
			if(on[num] && op==2) {
				//				out.println("4");
				out.println("YES");
			}
		}

		out.close();

	}
}

class friend implements Comparable<friend>{
	int id, v;
	public friend(int id, int v) {
		this.id = id;
		this.v = v;
	}
	public int compareTo(friend one) {
		return this.v-one.v;
	}

	public String toString() {return this.v+"";}
}


import java.io.BufferedWriter;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.util.Locale;
import java.util.Scanner;
import java.util.TreeSet;

public class Main {

    public static void main(String[] args) throws IOException {
        Locale.setDefault(Locale.US);
//        BufferedReader entrada = new BufferedReader(new InputStreamReader(System.in));
//        BufferedReader entrada = new BufferedReader(new InputStreamReader(new FileInputStream("C:\\Users\\felipe.santos\\Documents\\entradas.txt")));;;
//        Scanner entrada = new Scanner(new FileInputStream("/home/felipe/entradas.txt"));//C:\Users\felipe.santos\Documents\
        Scanner entrada = new Scanner(System.in);
        BufferedWriter saida = new BufferedWriter(new OutputStreamWriter(System.out));
//        BufferedWriter saida = new BufferedWriter(new OutputStreamWriter(new FileOutputStream("/home/felipe/saidas.txt")));
        int amigos = entrada.nextInt();
        int display = entrada.nextInt();
        int queries = entrada.nextInt();
        TreeSet<Integer> onlines = new TreeSet<>();
        TreeSet<Integer> pq = new TreeSet<>();
        int vetor[] = new int[amigos + 5];
        for (int i = 1; i <= amigos; i++) {
            vetor[i] = entrada.nextInt();
        }
        for (int i = 0; i < queries; i++) {
            int tipo = entrada.nextInt();
            int num = entrada.nextInt();
            if (tipo == 1) {
                onlines.add(vetor[num]);
                if (pq.size() < display) {
                    pq.add(vetor[num]);
                } else if (vetor[num] > pq.first()) {
                    pq.pollFirst();
                    pq.add(vetor[num]);
                }
            } else if (tipo == 2) {
                if (onlines.contains(vetor[num]) && vetor[num] >= pq.first()) {
                    saida.write("YES\n");
                } else {
                    saida.write("NO\n");
                }
            }
        }
        saida.flush();
    }

}


/*
 * Code Author: Sanket Udgirkar.
 * DA-IICT
 */
import java.util.*;
import java.io.*;
public class Tester
{
	public static long mod=(long)1e9+7;

	public static void main(String[] args)
	{
		InputReader s=new InputReader(System.in);
        OutputStream outputStream = System.out;
        //PrintWriter out=new PrintWriter(outputStream);

        int n=s.nextInt();
        int k=s.nextInt();
        int q=s.nextInt();

        int t[] = new int[n];

        for(int i=0; i<n; i++)
        	t[i]=s.nextInt();

        TreeSet<Integer> tset = new TreeSet<Integer>();

        for(int i=0; i<q; i++)
        {
        	int type=s.nextInt();
        	int id=s.nextInt();

        	if(type==1)
        	{
        		if(tset.size()<k)
        			tset.add(t[id-1]);
        		else
        		{
        			if(t[id-1]>tset.first())
        			{
        				tset.remove(tset.first());
        				tset.add(t[id-1]);
        			}
        		}
        	}
        	else
        	{
        		if(tset.contains(t[id-1]))
        			System.out.println("YES");
        		else
        			System.out.println("NO");
        	}

        }

        //out.close();
	}

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

	static long exp(long a, long b)
	{
		if(b==0)
			return 1;
		if(b==1)
			return a;
		if(b==2)
			return a*a;

		if(b%2==0)
			return exp(exp(a,b/2),2);
		else
			return a*exp(exp(a,(b-1)/2),2);
	}

	static class Pair implements Comparable<Pair>
	{
		long x,f;
		Pair(long ii, long cc)
		{
			x=ii;
			f=cc;
		}

		public int compareTo(Pair o)
		{
			return Long.compare(this.x, o.x);
		}

	}

    public static class InputReader
    {
    	public BufferedReader reader;
    	public StringTokenizer tokenizer;

    	public InputReader(InputStream inputstream)
    	{
    	      reader = new BufferedReader(new InputStreamReader(inputstream));
    	      tokenizer = null;
    	}

    	public String nextLine()
    	{
    	    String fullLine=null;
    	    while (tokenizer == null || !tokenizer.hasMoreTokens())
    	    {
    	        try {
    	              fullLine=reader.readLine();
    	            }
    	        catch (IOException e)
    	        {
    	              throw new RuntimeException(e);
    	        }
    	        return fullLine;
    	     }
    	     return fullLine;
    	}
    		public String next()
    		{
    	      while (tokenizer == null || !tokenizer.hasMoreTokens()) {
    	        try {
    	          tokenizer = new StringTokenizer(reader.readLine());
    	        } catch (IOException e) {
    	          throw new RuntimeException(e);
    	        }
    	      }
    	      return tokenizer.nextToken();
    	    }
    		public long nextLong() {
    		      return Long.parseLong(next());
    		    }
    	    public int nextInt() {
    	      return Integer.parseInt(next());
    	    }
    	  }

}


import java.io.*;
import java.util.*;

public class Main {

    static class FastScanner
    {
        BufferedReader br;
        StringTokenizer st;

        public FastScanner()
        {
            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());
        }

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

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

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

    public static void main(String[] args) throws IOException {
        FastScanner sc=new FastScanner();
        int N = sc.nextInt();
        int K = sc.nextInt();
        int Q = sc.nextInt();
        int[][] friends = new int[N+1][2];
        for (int i = 1; i <= N; i++) {
        	friends[i][0] = i;
        	friends[i][1] = sc.nextInt();
        }
        PriorityQueue<int[]> pq = new PriorityQueue<int[]>(new Comparator<int[]>(){
            public int compare(int[] a, int[] b) {
              return a[1] - b[1];
            }
        });
        HashSet<Integer> online = new HashSet<Integer>();
        for (int q = 0; q < Q; q++) {
        	int type = sc.nextInt();
        	int id = sc.nextInt();
        	if (type == 1) {
        		if (online.size() < K) {
        			online.add(id);
        			pq.add(friends[id]);
        		} else {
        			int[] minFriend = pq.peek();
        			if (minFriend[1] < friends[id][1]) {
        				online.remove(minFriend[0]);
        				online.add(id);
        				//remove minFriend, add friends[id];
        				pq.poll();
        				pq.add(friends[id]);
        			}
        		}
        	} else {
        		if (online.contains(id)) {
        			System.out.println("YES");
        		} else {
        			System.out.println("NO");
        		}
        	}
        }
    }
}


import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.Scanner;

public class BClass {
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int k = sc.nextInt();
		int q = sc.nextInt();
		final int[] friend = new int[n];
		int[] top = new int[k];

		for(int i=0;i<n;++i){
			friend[i] = sc.nextInt();
		}
		sc.nextLine();
		for(int i=0;i<q;++i){
			int t = sc.nextInt();
			int f = sc.nextInt();
			if(t == 1){
				if(top[0] == 0 || friend[top[0]-1] < friend[f-1]){
					top[0] = f;
				}
				int index = 0;
				while(index < k-1 && (top[index+1] == 0 || friend[top[index]-1]>friend[top[index+1]-1])){
					int temp = top[index];
					top[index]=top[index+1];
					top[index+1]=temp;
					index++;
				}
			}
			else{
				boolean bad = true;
				for(int j=0;j<k && bad;++j){
					if(top[j] == f){
						bad = false;
					}
				}
				if(!bad){
					System.out.println("YES");
				}
				else{
					System.out.println("NO");
				}
			}
		}
	}
}


import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.Scanner;

public class BClass {
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int k = sc.nextInt();
		int q = sc.nextInt();
		final int[] friend = new int[n];
		int[] top = new int[k];

		for(int i=0;i<n;++i){
			friend[i] = sc.nextInt();
		}
		sc.nextLine();
		for(int i=0;i<q;++i){
			int t = sc.nextInt();
			int f = sc.nextInt();
			if(t == 1){
				if(top[0] == 0 || friend[top[0]-1] < friend[f]){
					top[0] = f;
				}
				int index = 0;
				while(index < k-1 && (top[index+1] == 0 || friend[top[index]-1]>friend[top[index+1]-1])){
					int temp = top[index];
					top[index]=top[index+1];
					top[index+1]=temp;
					index++;
				}
			}
			else{
				boolean bad = true;
				for(int j=0;j<k && bad;++j){
					if(top[j] == f){
						bad = false;
					}
				}
				if(!bad){
					System.out.println("YES");
				}
				else{
					System.out.println("NO");
				}
			}
		}
	}
}


import java.io.*;
import java.util.*;
import java.math.*;

public class B658 {

	public static BufferedReader read = null;
	public static PrintWriter out = null;
	public static StringTokenizer token = null;

	public static void insert(int in, int l, int[] ar)
	{
		int temp = ar[l];
		ar[l] = in;
		for(int i=l+1; i<ar.length; i++)
		{
			int ct = ar[i];
			ar[i] = temp;
			temp = ct;
		}
	}
	public static void solve()
	{
		int n = nint(), k = nint(), q = nint();
		int[] t = narr(n);
		int[][] cd = new int[2][k];
		for(int i=0; i<k; i++)
		{
			cd[0][i] = -1;
			cd[1][i] = -1;
		}

		for(int i=0; i<q; i++)
		{
			int type = nint();
			int id = nint();
			if(type == 1)
			{
				int j = 0;
				while(j < k && cd[0][j] > t[id-1]) j++;
				if(j < k)
				{
					insert(t[id-1], j, cd[0]);
					insert(id, j, cd[1]);
				}
			}
			else
			{
				boolean f = false;
				for(int j =0; j<k; j++)
				{
					if(cd[1][j] == id) f= true;
				}
				out.println(f?"YES":"NO");
			}
		}
	}

	public static void main(String[] args)
	{
		read = new BufferedReader(new InputStreamReader(System.in));
		out = new PrintWriter(System.out);
		solve();
		out.flush();
		out.close();

	}

	// i/o functions
	public static String next() // returns the next string
	{
		while(token == null || !token.hasMoreTokens())
		{
			try {
				token = new StringTokenizer(read.readLine());
			} catch (IOException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}
		return token.nextToken();
	}

	public static int nint()
	{
		return Integer.parseInt(next());
	}
	public static long nlong()
	{
		return Long.parseLong(next());
	}
	public static double ndouble()
	{
		return Double.parseDouble(next());
	}
	public static int[] narr(int n)
	{
		int[] a = new int[n];
		for(int i=0; i<n; i++) a[i] = nint();
		return a;
	}

	public static long[] nal(int n)
	{
		long[] a = new long[n];
		for(int i=0; i<n; i++) a[i] = nlong();
		return a;
	}

}


import java.util.*;
import java.util.stream.Collectors;

/**
 * Created by wannabe on 30.03.16.
 */
public class B {

	static class Friend implements Comparable<Friend> {
		private final int id;
		private final Integer power;

		public Friend(int id, Integer power) {
			this.id = id;
			this.power = power;
		}

		public int getId() {
			return id;
		}

		public Integer getPower() {
			return power;
		}

		@Override
		public int compareTo(Friend o) {
			return power.compareTo(o.getPower());
		}

		@Override
		public boolean equals(Object o) {
			if (this == o) return true;
			if (o == null || getClass() != o.getClass()) return false;

			Friend friend = (Friend) o;

			if (id != friend.id) return false;
			return power.equals(friend.power);

		}

		@Override
		public int hashCode() {
			int result = id;
			result = 31 * result + power.hashCode();
			return result;
		}
	}

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);

		int n = in.nextInt();
		int k = in.nextInt();
		int q = in.nextInt();

		Map<Integer, Friend> friendMap = new HashMap<>();
		for (int i = 1; i <= n; i++) {
			friendMap.put(i, new Friend(i, in.nextInt()));
		}
		TreeSet<Friend> friends = new TreeSet<>();

		int reqType;
		int id;
		List<String> result = new ArrayList<>();
		for (int i = 0; i < q; i++) {
			reqType = in.nextInt();
			id = in.nextInt();

			if (reqType == 1) {
				login(friendMap.get(id), friends, k);
			} else {
				result.add(checkFriend(friendMap.get(id), friends, k));
			}
		}
		System.out.println(
			result.stream()
			.collect(Collectors.joining("\n"))
		);
	}

	private static String checkFriend(Friend friend, Set<Friend> friends, int k) {
		return friends.contains(friend) ? "YES" : "NO";
	}

	private static void login(Friend friend, TreeSet<Friend> friends, int k) {
		if (friends.size() < k) {
			friends.add(friend);
			return;
		}
		if (friend.compareTo(friends.first()) < 1) {
			return;
		}
		friends.pollFirst();
		friends.add(friend);
	}

}


import java.io.*;
import java.util.*;
import java.awt.Point;

public class VKCup_R1_Div2_B {
	public static void main(String[] args) throws IOException {
		InputReader ir = new InputReader(System.in);
		OutputWriter out = new OutputWriter(System.out);
		Comparator<Point> comp = new Comparator<Point>() {
			public int compare(Point o1, Point o2) {
				return o1.x-o2.x;
			}
		};
		int n = ir.readInt();
		int k = ir.readInt();
		int q = ir.readInt();
		Point [] values = new Point [n+1];
		for (int i = 1; i < values.length; i++) {
			values[i] = new Point(ir.readInt(), i);
		}
		TreeSet<Point> currOnline = new TreeSet<Point>(comp);
		for(int i = 1;i <= k;i++)
			currOnline.add(new Point(-i, i));
		for(int i = 0;i < q;i++) {
			int qtype = ir.readInt();
			int id = ir.readInt();
			if(qtype == 2)
				out.printLine(currOnline.contains(values[id])?"YES":"NO");
			else {
				Point currMin = currOnline.first();
				if(values[id].x > currMin.x) {
					currOnline.remove(currMin);
					currOnline.add(values[id]);
				}
			}
		}
		out.close();
	}
	static class InputReader {
		private InputStream stream;
		private byte[] buf = new byte[1024];
		private int curChar;
		private int numChars;
		private SpaceCharFilter filter;

		public InputReader(InputStream stream) {
			this.stream = stream;
		}
		public int read() {
			if (numChars == -1)
				throw new InputMismatchException();
			if (curChar >= numChars) {
				curChar = 0;
				try {
					numChars = stream.read(buf);
				} catch (IOException e) {
					throw new InputMismatchException();
				}
				if (numChars <= 0)
					return -1;
			}
			return buf[curChar++];
		}
		public int readInt() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			int res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}
		public boolean isSpaceChar(int c) {
			if (filter != null)
				return filter.isSpaceChar(c);
			return isWhitespace(c);
		}
		public static boolean isWhitespace(int c) {
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}
		public interface SpaceCharFilter {
			public boolean isSpaceChar(int ch);
		}
	}

	static class OutputWriter {
		private final PrintWriter writer;
		public OutputWriter(OutputStream outputStream) {
			writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
		}
		public OutputWriter(Writer writer) {
			this.writer = new PrintWriter(writer);
		}
		public void print(Object... objects) {
			for (int i = 0; i < objects.length; i++) {
				if (i != 0)
					writer.print(' ');
				writer.print(objects[i]);
			}
		}
		public void printLine(Object... objects) {
			print(objects);
			writer.println();
		}
		public void close() {
			writer.close();
		}
		public void printLine(int i) {
			writer.println(i);
		}
	}
}


import java.io.*;
import java.util.*;

public class tmp1 {

    public static void main(String[] args) {
        InputReader in = new InputReader(System.in);
        PrintWriter out = new PrintWriter(System.out);

        int n = in.nextInt(),
                k = in.nextInt(),
                q = in.nextInt();
        Node[] best = new Node[k];
        int [] t = new int[n];
        for (int i = 0; i < best.length; i++)
            best[i] = new Node(-1, -1);

        for (int i = 0; i < n; i++)
            t[i] = in.nextInt();
        for (int i = 0; i < q; i++) {
            int type = in.nextInt(),
                    id = in.nextInt();
            boolean hogaya = false;
            if(type == 1) {
                for (int j = 0; j < best.length; j++) {
                    if(best[j].u == -1) {
                        best[j] = new Node(id, t[id-1]);
                        hogaya = true;
                        break;
                    }
                }
                if(!hogaya) {
                    if(best[best.length - 1].v < t[id-1]) {
                        best[best.length - 1] = new Node(id, t[id-1]);
                    }
                }
                Arrays.sort(best);
            } else {
                boolean found = false;
                for (int j = 0; j < best.length; j++)
                    if(best[j] != null)
                        if(best[j].u == id)
                            found = true;
                out.println(found?"YES" : "NO");
            }
        }

        out.close();
    }

    static class Node implements Comparable<Node> {
        int u, v;           //u is id

        public Node (int u, int v) {
            this.u = u;
            this.v = v;
        }

        public void print() {
            System.out.println("u = " + u + ", v = " + v + ", weight = " + 0);
        }

        public int compareTo(Node n) {
            return Integer.compare(-this.v, -n.v);
        }
    }

    static class InputReader {

        private InputStream stream;
        private byte[] buf = new byte[8192];
        private int curChar, snumChars;
        private SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int snext() {
            if (snumChars == -1)
                throw new InputMismatchException();
            if (curChar >= snumChars) {
                curChar = 0;
                try {
                    snumChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (snumChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public int nextInt() {
            int c = snext();
            while (isSpaceChar(c))
                c = snext();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = snext();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = snext();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public long nextLong() {
            int c = snext();
            while (isSpaceChar(c))
                c = snext();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = snext();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = snext();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

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

        public String readString() {
            int c = snext();
            while (isSpaceChar(c))
                c = snext();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = snext();
            } while (!isSpaceChar(c));
            return res.toString();
        }

        public boolean isSpaceChar(int c) {
            if (filter != null)
                return filter.isSpaceChar(c);
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);
        }
    }
}


import java.io.*;
import java.util.*;

public class cf104{
	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int k = sc.nextInt();
		int q = sc.nextInt();

		int[] aa = new int[n];
		for(int i=0;i<n;i++){
           aa[i] = sc.nextInt();
		}
        int[] oo = new int[n];
		TreeMap<Integer,Integer> tm = new TreeMap<Integer,Integer>();
		for(int i=0;i<q;i++){
            int tp = sc.nextInt();
            int id = sc.nextInt();

            if(tp==1){
                  tm.put(aa[id-1],1);
                  oo[id-1]=1;
            }
            if(tp==2){
               	if((tm.size()==0) || (oo[id-1]==0)){
                    System.out.println("NO");
               	}
               	else{

               	    if((oo[id-1]==1) && tm.tailMap(aa[id-1]).size()<=k){
               	    	//System.out.println(tm.tailMap(aa[id-1]));
               	    	//tm.put(aa[id-1],1);
                        System.out.println("YES");
               	    }
               	    else{
               	     	System.out.println("NO");
               	    }
               	}

            }

        }

	}
}


import java.io.*;
import java.util.*;

public class cf104{
	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int k = sc.nextInt();
		int q = sc.nextInt();

		int[] aa = new int[n];
		for(int i=0;i<n;i++){
           aa[i] = sc.nextInt();
		}
        int[] oo = new int[n];
		//TreeMap<Integer,Integer> tm = new TreeMap<Integer,Integer>();
		ArrayList<Integer> arr = new ArrayList<>();
		for(int i=0;i<q;i++){
            int tp = sc.nextInt();
            int id = sc.nextInt();

            if(tp==1){
                  arr.add(aa[id-1]);
                  if(arr.size()>k){
                  	 int min = arr.get(0);
                  	 int ind=0;
                     for(int j=1;j<arr.size();j++){
                         if(min>arr.get(j)){
                            min = arr.get(j);
                            ind = j;
                         }
                     }
                     arr.remove(ind);
                  }
                  oo[id-1]=1;
            }
            if(tp==2){
               	if((arr.size()==0) || (oo[id-1]==0)){
                    System.out.println("NO");
               	}
               	else{

               	    if((oo[id-1]==1) && arr.contains(aa[id-1])){
               	    	//System.out.println(tm.tailMap(aa[id-1]));
               	    	//tm.put(aa[id-1],1);
                        System.out.println("YES");
               	    }
               	    else{
               	     	System.out.println("NO");
               	    }
               	}

            }

        }

	}
}


import java.io.*;
import java.util.*;

public class cf104{
	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int k = sc.nextInt();
		int q = sc.nextInt();

		int[] aa = new int[n];
		for(int i=0;i<n;i++){
           aa[i] = sc.nextInt();
		}
        int[] oo = new int[n];
		TreeMap<Integer,Integer> tm = new TreeMap<Integer,Integer>();
		//ArrayList<Integer> arr = new ArrayList<>();
		for(int i=0;i<q;i++){
            int tp = sc.nextInt();
            int id = sc.nextInt();

            if(tp==1){
                  //arr.add(aa[id-1]);
            	  tm.put(aa[id-1],1);
                  if(tm.size()>k){
                  	 //int min = arr.get(0);
                  	 //int ind=0;
                     // for(int j=1;j<arr.size();j++){
                     //     if(min>arr.get(j)){
                     //        min = arr.get(j);
                     //        ind = j;
                     //     }
                     // }
                     //arr.remove(ind);
                  	 tm.remove(tm.firstKey());
                  }
                  oo[id-1]=1;
            }
            if(tp==2){
               	if((tm.size()==0) || (oo[id-1]==0)){
                    System.out.println("NO");
               	}
               	else{

               	    if((oo[id-1]==1) && tm.containsKey(aa[id-1])){
               	    	//System.out.println(tm.tailMap(aa[id-1]));
               	    	//tm.put(aa[id-1],1);
                        System.out.println("YES");
               	    }
               	    else{
               	     	System.out.println("NO");
               	    }
               	}

            }

        }

	}
}


import java.io.*;
import java.util.*;

public class cf104{
	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int k = sc.nextInt();
		int q = sc.nextInt();

		int[] aa = new int[n];
		for(int i=0;i<n;i++){
           aa[i] = sc.nextInt();
		}

		TreeMap<Integer,Integer> tm = new TreeMap<Integer,Integer>();
		for(int i=0;i<q;i++){
            int tp = sc.nextInt();
            int id = sc.nextInt();

            if(tp==1){
                  tm.put(aa[id-1],1);
            }
            if(tp==2){
               	if(tm.size()==0 || !tm.containsKey(aa[id-1])){
                    System.out.println("NO");
               	}
               	else{

               	    if(tm.containsKey(aa[id-1]) && tm.tailMap(aa[id-1]+1).size()<k){
               	    	//System.out.println(tm.tailMap(aa[id-1]));
               	    	//tm.put(aa[id-1],1);
                        System.out.println("YES");
               	    }
               	    else{
               	     	System.out.println("NO");
               	    }
               	}

            }

        }

	}
}


#include <iostream>
#include <vector>
#include <algorithm>

int main()
{
	int n;

	std::cin >> n;

	std::vector<int> a(n);
	for (int i = 0; i < n; ++i)
		std::cin >> a[i];

	int minK = *std::max_element(a.begin(), a.end());
	for (int i = 0; i < n / 2; ++i)
	{
		int k = a[i] / (n - i - 1);
		if (minK > k)
			minK = k;
	}
	for (int i = n / 2; i < n; ++i)
	{
		int k = a[i] / i;
		if (minK > k)
			minK = k;
	}

	std::cout << minK;

	return 0;
}


#include <stdio.h>
#include <algorithm>
#include <math.h>
#include <vector>
using namespace std;
#define lli long long int
const int INF = 1e9 + 1;
const int MODV = 1000 * 1000 * 1000 + 7;

int arr[300000];

int main()
{
	int n, ans = INF;
	scanf("%d", &n);
	for (int i = 0; i < n; i++) scanf("%d", &arr[i]);
	for (int i = 0; i < n; i++) {
		if (i > 0) ans = min(ans, arr[i] / i);
		if (i < n - 1) ans = min(ans, arr[i] / (n - i - 1));
	}
	printf("%d\n", ans);
	return 0;
}


#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cstring>
#include <map>
#include <set>
#include <cstdlib>
#include <vector>
#include <queue>
#include <ctime>
#include <string>
#include <cstdlib>
using namespace std;
long long int A[300010];
int main() {
	int N;
	cin >> N;
	for (int i = 1; i <= N; i++) {
		cin >> A[i];
	}
	long long int Ans = 1e15;
	for (int i = 1; i <= N; i++) {
		if (i == 1 || i == N) {
			Ans = min(Ans, min(A[1], A[N]) / (N - 1));
		}
		else {
			Ans = min(Ans, min(A[1], A[i]) / (i - 1));
			Ans = min(Ans, min(A[N], A[i]) / (N - i));
		}
	}
	cout << Ans;
	return 0;
}


#include <iostream>
#include <algorithm>
#include <math.h>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <unordered_map>
#include <set>
#include <functional>

using namespace std;

//int main()
//{
//	int n;
//	string s;
//
//	scanf("%d", &n);
//	getchar();
//	cin >> s;
//
//	int count = 0;
//
//	for (int i = 0; i < n; i++)
//	{
//		if (s[i] == '-')
//		{
//			count = max(0, count - 1);
//		}
//		else
//		{
//			count++;
//		}
//	}
//
//	printf("%d\n", count);
//
//	return 0;
//}

#define N 300005
pair<int, int> arr[N];
int c[N];

int main()
{
	int n;
	scanf("%d", &n);

	for (int i = 0; i < n; i++)
	{
		scanf("%d", &arr[i].first);
		arr[i].second = i + 1;
	}

	sort(&arr[0], &arr[0] + n, [](auto& x, auto& y) {
		return x.first < y.first;
	});

	int R1 = arr[n - 1].second;
	int R2 = arr[n - 1].second;
	c[n - 1] = 0;

	for (int i = n - 2; i >= 0; i--)
	{
		c[i] = arr[i].first / (max(abs(R1 - arr[i].second), abs(R2 - arr[i].second)));

		R1 = min(R1, arr[i].second);
		R2 = max(R2, arr[i].second);
	}

	int ans = c[0];

	for (int i = 1; i < n - 1; i++)
	{
		ans = min(ans, c[i]);
	}

	printf("%d\n", ans);

	return 0;
}


#include <stdio.h>
#include <algorithm>
#include <math.h>
#define INF 0x7fffffff;
using namespace std;
pair<int, int> input[300002], sor[300002];
int n;
int main()
{
	int dap = INF;
	scanf("%d", &n);
	for (int i = 1; i <= n; i++)
	{
		scanf("%d", &input[i].first);
		input[i].second = i;
		sor[i] = input[i];
	}
	sort(sor + 1, sor + n + 1);
	for (int i = 1; i <= n; i++)
	{
		int k = INF;
		if (n - sor[i].second)
			k = min(k, min(sor[i].first , input[n].first) / (n - sor[i].second));
		if (sor[i].second - 1)
			k = min(k, min(sor[i].first , input[1].first) / (sor[i].second - 1));
	//	printf("%d//", k);
		dap = min(dap, k);
	}
	printf("%d", dap);
}


#include<iostream>
#include<stdio.h>
#include<string.h>
#include<algorithm>
using namespace std;
int a[400000];
int main()
{
    int n;
    while(~scanf("%d",&n))
    {
        for(int i=1;i<=n;i++)
        {
            scanf("%d",&a[i]);
        }
        int w=99999999;
        for(int i=1;i<n;i++)
        {
            if(i==1)
            {
                int x=min(a[i],a[n]);
               int m=x/(n-i);
                w=min(w,m);
            }
            else{
            int x=min(a[i],a[1]);
            int y=min(a[i],a[n]);
            int m=x/(i-1);
             int u=y/(n-i);
            w=min(w,min(m,u));
            }
        }
        printf("%d\n",w);
    }
    return 0;
}


#include<iostream>
#include<stdio.h>
#include<string.h>
#include<algorithm>
using namespace std;
int a[400000];
int main()
{
    int n;
    while(~scanf("%d",&n))
    {
        for(int i=1;i<=n;i++)
        {
            scanf("%d",&a[i]);
        }
        int w=1000000000;
        for(int i=1;i<n;i++)
        {
            if(i==1)
            {
                int x=min(a[i],a[n]);
               int m=x/(n-i);
                w=min(w,m);
            }
            else{
            int x=min(a[i],a[1]);
            int y=min(a[i],a[n]);
            int m=x/(i-1);
             int u=y/(n-i);
            w=min(w,min(m,u));
            }
        }
        printf("%d\n",w);
    }
    return 0;
}


#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <vector>
#include <string>
#include <stdio.h>
#include <algorithm>
#include <set>
#include <map>
#include <math.h>
#include <cmath>
#include <queue>
#include <iomanip>
#include <bitset>
#include <unordered_map>
#include <stack>
#include <memory.h>
#include <list>
#include <numeric>
#include <functional>
#include <complex>
#include <cassert>

//#pragma comment(linker, "/STACK:36777216")

#define ll long long
#define ld long double
#define ull unsigned ll
#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()
#define pii pair<int,int>
#define vi vector<int>
#define vpii vector<pii>
#define vvi vector<vector<int>>
#define forn(it,from,to) for(int (it)=from; (it)<to; (it)++)
const int  Inf = 2e9;
ll LINF = (ll)4e18;
using namespace std;
ll mod = 1e9 + 7;
#define M_PI       3.14159265358979323846   // pi

int main() {
#ifdef _DEBUG
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#else
	//freopen("sum.in", "r", stdin);
	//freopen("sum.out", "w", stdout);
	//freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);
#endif
	ios::sync_with_stdio(false);
	cin.tie(0); cout.tie(0);

	int n;
	cin >> n;
	vector <int> a(n, 0);
	for (auto &x : a) cin >> x;
	int ans = INT_MAX;
	for (int i = 0; i < n; i++) {
		ans = min(a[i] / max(i, n - i - 1), ans);
	}

	cout << ans;

	return 0;
}


#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <vector>
#include <string>
#include <stdio.h>
#include <algorithm>
#include <set>
#include <map>
#include <math.h>
#include <cmath>
#include <queue>
#include <iomanip>
#include <bitset>
#include <unordered_map>
#include <stack>
#include <memory.h>
#include <list>
#include <numeric>
#include <functional>
#include <complex>
#include <cassert>

//#pragma comment(linker, "/STACK:36777216")

#define ll long long
#define ld long double
#define ull unsigned ll
#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()
#define pii pair<int,int>
#define vi vector<int>
#define vpii vector<pii>
#define vvi vector<vector<int>>
#define forn(it,from,to) for(int (it)=from; (it)<to; (it)++)
const int  Inf = 2e9;
ll LINF = (ll)4e18;
using namespace std;
ll mod = 1e9 + 7;
#define M_PI       3.14159265358979323846   // pi

int main() {
#ifdef _DEBUG
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#else
	//freopen("sum.in", "r", stdin);
	//freopen("sum.out", "w", stdout);
	//freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);
#endif
	ios::sync_with_stdio(false);
	cin.tie(0); cout.tie(0);

	int n;
	cin >> n;
	vector <int> a(n, 0);
	for (auto &x : a) cin >> x;
	int ans = INT_MAX;
	for (int i = 0; i < n; i++) {
		for (int j = i + 1; j < n; j++) {
			ans = min(min(a[i], a[j]) / (j - i), ans);
		}
	}

	cout << ans;

	return 0;
}


#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <vector>
#include <string>
#include <stdio.h>
#include <algorithm>
#include <set>
#include <map>
#include <math.h>
#include <cmath>
#include <queue>
#include <iomanip>
#include <bitset>
#include <unordered_map>
#include <stack>
#include <memory.h>
#include <list>
#include <numeric>
#include <functional>
#include <complex>
#include <cassert>

//#pragma comment(linker, "/STACK:36777216")

#define ll long long
#define ld long double
#define ull unsigned ll
#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()
#define pii pair<int,int>
#define vi vector<int>
#define vpii vector<pii>
#define vvi vector<vector<int>>
#define forn(it,from,to) for(int (it)=from; (it)<to; (it)++)
const int  Inf = 2e9;
ll LINF = (ll)4e18;
using namespace std;
ll mod = 1e9 + 7;
#define M_PI       3.14159265358979323846   // pi

int main() {
#ifdef _DEBUG
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#else
	//freopen("sum.in", "r", stdin);
	//freopen("sum.out", "w", stdout);
	//freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);
#endif
	ios::sync_with_stdio(false);
	cin.tie(0); cout.tie(0);

	int n;
	cin >> n;
	vector <int> a(n, 0);
	for (auto &x : a) cin >> x;
	int ch = min(a[0], a[n - 1]);
	int h = n - 1;
	int ans = 0;
	while (h * ans < ch) {
		ans++;
	}
	if (ans * h > ch) ans--;
	cout << ans;

	return 0;
}


#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <vector>
#include <string>
#include <stdio.h>
#include <algorithm>
#include <set>
#include <map>
#include <math.h>
#include <cmath>
#include <queue>
#include <iomanip>
#include <bitset>
#include <unordered_map>
#include <stack>
#include <memory.h>
#include <list>
#include <numeric>
#include <functional>
#include <complex>
#include <cassert>

//#pragma comment(linker, "/STACK:36777216")

#define ll long long
#define ld long double
#define ull unsigned ll
#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()
#define pii pair<int,int>
#define vi vector<int>
#define vpii vector<pii>
#define vvi vector<vector<int>>
#define forn(it,from,to) for(int (it)=from; (it)<to; (it)++)
const int  Inf = 2e9;
ll LINF = (ll)4e18;
using namespace std;
ll mod = 1e9 + 7;
#define M_PI       3.14159265358979323846   // pi

int main() {
#ifdef _DEBUG
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#else
	//freopen("sum.in", "r", stdin);
	//freopen("sum.out", "w", stdout);
	//freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);
#endif
	ios::sync_with_stdio(false);
	cin.tie(0); cout.tie(0);

	int n;
	cin >> n;
	vector <int> a(n, 0);
	for (auto &x : a) cin >> x;
	int ch = min(a[0], a[n - 1]);
	int h = n - 1;
	int ans = 0;
	while (h * ans < ch) {
		ans++;
	}
	if (ans * h > ch) ans--;
	int mini = min_element(a.begin(), a.end()) - a.begin(), minval = a[mini];
	int ln = min(mini, n - mini - 1);
	while (ln * ans > minval) {
		ans--;
	}
	cout << ans;

	return 0;
}


#include <iomanip>
#include <iostream>
#include <vector>
#include <set>
#include <map>
#include <algorithm>
#include <ctime>
#include <cstdio>
#include <cmath>
#include <queue>
#include <bitset>
#include <string>

#define ll long long
#define mp make_pair
#define pb push_back

using namespace std;

const int N = 1000010;
const ll INF = 4e18;

int n;
pair <int, int> p[N];
int a[N], b[N];

bool check(int k) {
    ll minval = INF, maxval = -INF;
    for (int i = 1; i <= n; i++) {
        ll cur = 1ll * k * b[i];
        if (minval < cur - a[i] || maxval > cur + a[i]) return false;
        minval = min(minval, cur);
        maxval = max(maxval, cur);
    }
    return true;
}

int main() {
    scanf("%d", &n);
    for (int i = 1; i <= n; i++) scanf("%d", &p[i].first);
    for (int i = 1; i <= n; i++) p[i].second = i;
    sort(p + 1, p + n + 1);
    reverse(p + 1, p + n + 1);
    for (int i = 1; i <= n; i++) {
        a[i] = p[i].first;
        b[i] = p[i].second;
    }
    int l = 0, r = 1e9+1;
    while (l + 1 < r) {
        int m = (l + r) / 2;
        if (check(m)) l = m;
        else r = m - 1;
    }
    int ans;
    if (check(r)) ans = r;
    else ans = l;
    cout << ans;
    return 0;

}


#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize("unroll-loops")

#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <fstream>
#include <sstream>
#include <set>
#include <map>
#include <vector>
#include <list>
#include <algorithm>
#include <cstring>
#include <cmath>
#include <string>
#include <queue>
#include <bitset>		//UWAGA - w czasie kompilacji musi byc znany rozmiar wektora - nie mozna go zmienic
#include <cassert>
#include <iomanip>		//do setprecision
#include <ctime>
#include <complex>
using namespace std;

#define FOR(i,b,e) for(int i=(b);i<(e);++i)
#define FORQ(i,b,e) for(int i=(b);i<=(e);++i)
#define FORD(i,b,e) for(int i=(b)-1;i>=(e);--i)
#define REP(x, n) for(int x = 0; x < (n); ++x)
#define ALL(u) (u).begin(),(u).end()

#define ST first
#define ND second
#define PB push_back
#define MP make_pair
#define LL long long
#define ULL unsigned LL
#define LD long double

typedef pair<int, int> PII;

const double pi = 3.141592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342;

const int MR = 3e5 + 10;

PII t[MR];

int f[MR];

int main()
{
	int n;
	scanf("%d", &n);
	vector<PII> V;
	REP(i, n)
	{
		int a;
		scanf("%d", &a);
		V.push_back(MP(a, i));
	}

	sort(V.begin(), V.end());

	t[n] = MP(MR, -MR);

	FORD(i, n, 0)
	{
		t[i] = t[i + 1];
		t[i].first = min(t[i].first, V[i].second);
		t[i].second = max(t[i].second, V[i].second);
	}

	REP(i, n)
		f[i] = 1e9 + 7;

	REP(i, n)
	{
		int dl = max(V[i].second - t[i].first, t[i].second - V[i].second);
		f[dl] = min(f[dl], V[i].first);
	}

	REP(i, n)
	{
		int dl = abs(i - V[0].second);
		f[dl] = V[0].first;
	}

	int res = V[0].first;
	FOR(i, 1, n)
		res = min(res, f[i] / i);

	printf("%d\n", res);

	return 0;
}

// FOR GNU C++ use the following pattern:
// Uncomment the code below and change your main into main2
// It does not build in MS C++
// But it does increase the stack size from 256 MB on CF and uses GNU C++

//#include <Processthreadsapi.h>
//#include <iostream>
//#include <Synchapi.h>
//#include <windows.h>
//#include <process.h>
//
//DWORD WINAPI MyThreadFunction(LPVOID lpParam) {
//    main2(nullptr);
//    return 0;
//}
//int main() {
//    auto h = CreateThread(nullptr, 1024 << 20, MyThreadFunction, nullptr, STACK_SIZE_PARAM_IS_A_RESERVATION, nullptr);
//    WaitForSingleObject(h, INFINITE);
//}


#include <iostream>
#include <algorithm>
#include <string>

using namespace std;

int a[300100];

int main()
{
	int n, ans1 = 0x3f3f3f3f;
	cin >> n;
	for (int i = 1; i <= n; i++)
	{
		cin >> a[i];
		ans1 = min(ans1, a[i]);
	}
	for (int i = ans1; i >= 0; i--)
	{
		int flag = 0;
		for (int j = n - 1; j >= 1; j--)
		{
			for (int k = 1; k + j <= n; k++)
			{
				long long int t = i * j;
				if (t > min(a[k], a[k + j]))
				{
					flag = 1;
					break;
				}
			}
			if (flag)
				break;
		}
		if (flag == 0)
		{
			cout << i;
			break;
		}
	}
	return 0;
}


#include <iostream>
#include <algorithm>
#include <string>

using namespace std;

int a[300100];

int main()
{
	int n, ans1 = 0x3f3f3f3f, ans2 = 0x3f3f3f3f, c = 0;
	cin >> n;
	for (int i = 1; i <= n; i++)
	{
		cin >> a[i];
		if (a[i] < ans1)
		{
			ans1 = a[i];
			c = i;
		}
	}
	for (int j = 1; j <= n - 1; j++)
	{
		for (int k = c; k <= n; k++)
		{
			if (j == k)
				continue;
			int t = min(a[j], a[k]) / abs(j - k);
			ans2 = min(ans2, t);
		}
	}
	cout << ans2;
	return 0;
}


#include <iostream>
#include <algorithm>
#include <string>

using namespace std;

int a[300100];

int main()
{
	int n, ans1 = 0x3f3f3f3f, ans2 = 0x3f3f3f3f;
	cin >> n;
	for (int i = 1; i <= n; i++)
	{
		cin >> a[i];
		ans1 = min(ans1, a[i]);
	}
	for (int i = 1; i < n; i++)
	{
		int t = min(a[i], a[n]) / (n - i);
		ans2 = min(ans2, t);
	}
	if (ans1 == 0)
	{
		cout << 0;
		return 0;
	}
	for (int i = ans1 - 1; i >= 0; i--)
	{
		if (i <= ans2)
		{
			cout << i;
			break;
		}
	}
	return 0;
}


#include <iostream>
#include <algorithm>
#include <string>

using namespace std;

int a[300100];

int main()
{
	int n, ans1 = 0x3f3f3f3f, ans2 = 0x3f3f3f3f;
	cin >> n;
	for (int i = 1; i <= n; i++)
	{
		cin >> a[i];
		ans1 = min(ans1, a[i]);
	}
	for (int j = 1; j <= n - 1; j++)
		{
			for (int k = j + 1; k <= n; k++)
			{
				int t = min(a[j], a[k]) / abs(j - k);
				ans2 = min(ans2, t);
			}
		}
	for (int i = ans1; i >= 0; i--)
	{
		if (i <= ans2)
		{
			cout << i;
			break;
		}
	}
	return 0;
}


#include <iostream>
#include <algorithm>
#include <string>

using namespace std;

int a[300100];

int main()
{
	int n, ans1 = 0x3f3f3f3f, ans2 = 0x3f3f3f3f;
	cin >> n;
	for (int i = 1; i <= n; i++)
	{
		cin >> a[i];
		ans1 = min(ans1, a[i]);
	}
	for (int j = ans1; j >= 0 ;j--)
	{
		int flag = 0;
		for (int i = 1; i < n; i++)
	    {
		    if (j * (n - i) > min(a[i], a[n]))
			{
				flag = 1;
				break;
			}
	    }
		if (flag == 0)
		{
			cout << j;
			break;
		}
	}
	return 0;
}


#include <iostream>
#include <algorithm>
#include <string>

using namespace std;

int a[300100];

int main()
{
	int n, ans1 = 0x3f3f3f3f;
	double ans2 = 0x3f3f3f3f;
	cin >> n;
	for (int i = 1; i <= n; i++)
	{
		cin >> a[i];
		ans1 = min(ans1, a[i]);
	}
	for (int i = 1; i < n; i++)
	{
		double t = (double)min(a[i], a[n]) / (n - i);
		ans2 = min(ans2, t);
	}
	for (int i = ans1; i >= 0; i--)
	{
		if (i <= ans2)
		{
			cout << i;
			break;
		}
	}
	return 0;
}


#include <iostream>
#include <algorithm>
#include <string>

using namespace std;

int a[300000];

int main()
{
	int n, ans1 = 0x3f3f3f3f;
	cin >> n;
	for (int i = 0; i < n; i++)
	{
		cin >> a[i];
		ans1 = min(ans1, a[i]);
	}
	if (ans1 == 0)
		cout << 0;
	for (int i = ans1 - 1; i >= 0; i--)
	{
		int flag = 0;
		for (int j = 0; j < n - 1; j++)
		{
			for (int k = j + 1; k < n; k++)
			{
				if (i * abs(j - k) > min(a[j], a[k]))
				{
					flag = 1;
					break;
				}
			}
			if (flag)
				break;
		}
		if (flag == 0)
		{
			cout << i;
			break;
		}
	}
	return 0;
}


#include <iostream>
#include <algorithm>
#include <string>

using namespace std;

long long int a[300000];

int main()
{
	long long int n, ans1 = 0x3f3f3f3f;
	cin >> n;
	for (int i = 0; i < n; i++)
	{
		cin >> a[i];
		ans1 = min(ans1, a[i]);
	}
	if (ans1 == 0)
		cout << 0;
	for (long long int i = ans1 - 1; i >= 0; i--)
	{
		int flag = 0;
		for (long long int j = 0; j < n - 1; j++)
		{
			for (long long int k = j + 1; k < n; k++)
			{
				if (i * abs(j - k) > min(a[j], a[k]))
				{
					flag = 1;
					break;
				}
			}
			if (flag)
				break;
		}
		if (flag == 0)
		{
			cout << i;
			break;
		}
	}
	return 0;
}


#include <iostream>
#include <algorithm>
#include <string>

using namespace std;

int a[300000];

int main()
{
	int n, ans1 = 0x3f3f3f3f, ans2 = 0;
	cin >> n;
	for (int i = 0; i < n; i++)
	{
		cin >> a[i];
		ans1 = min(ans1, a[i]);
		ans2 = max(ans2, a[i]);
	}
	for (int i = ans1; i >= 0; i--)
	{
		for (int c = n - 1; c > 0; c--)
		{
			if(i * c < ans2)
			{
				int flag = 0;
		        for (int j = 0; j < n - 1; j++)
		        {
			         for (int k = j + 1; k < n; k++)
			         {
				            long long int t = i * abs(j - k);
				            if (t > min(a[j], a[k]))
				            {
					             flag = 1;
					             break;
				            }
			         }
			         if (flag)
				     break;
		        }
		        if (flag == 0)
		        {
			       cout << i;
			       return 0;
		        }
			}
		}
	}
}


#include <iostream>
#include <algorithm>
#include <string>

using namespace std;

int a[300100];

int main()
{
	int n, ans1 = 0x3f3f3f3f, ans2 = 0x3f3f3f3f;
	cin >> n;
	for (int i = 1; i <= n; i++)
	{
		cin >> a[i];
		ans1 = min(ans1, a[i]);
	}
	for (int j = n - 1; j >= 1; j--)
	{
		for (int k = 1; k + j <= n; k++)
		{
			int t = min(a[k], a[k + j]) / j;
			ans2 = min(t, ans2);
		}
	}
	for (int i = ans1; i >= 0; i--)
	{
		if (i <= ans2)
		{
			cout << i;
			break;
		}
	}
	return 0;
}


#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <algorithm>
#include <string>

using namespace std;

int main()
{
	int n, a, ans2 = 0x3f3f3f3f, d = 0;
	cin >> n;
	for (int i = 1; i <= n; i++)
	{
		d = max(i - 1, n - i);
		cin >> a;
		ans2 = min(ans2, a / d);
	}
	cout << ans2;
	return 0;
}


#include <iostream>
#include <algorithm>
#include <string>

using namespace std;

int a[300000];

int main()
{
	int n, ans1 = 0x3f3f3f3f, ans2 = 0;
	cin >> n;
	for (int i = 0; i < n; i++)
	{
		cin >> a[i];
		ans1 = min(ans1, a[i]);
		ans2 = max(ans2, a[i]);
	}
	for (int i = ans1; i >= 0; i--)
	{
		for (int c = n - 1; c > 0; c--)
		{
			if(i * c <= ans2)
			{
				int flag = 0;
		        for (int j = 0; j < n - 1; j++)
		        {
			         for (int k = j + 1; k < n; k++)
			         {
				            long long int t = i * abs(j - k);
				            if (t > min(a[j], a[k]))
				            {
					             flag = 1;
					             break;
				            }
			         }
			         if (flag)
				     break;
		        }
		        if (flag == 0)
		        {
			       cout << i;
			       return 0;
		        }
			}
		}
	}
}


#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <algorithm>
#include <string>

using namespace std;

int a[300100];

int main()
{
	int n, ans2 = 0x3f3f3f3f, c = 0;
	scanf("%d", &n);
	for (int i = 1; i <= n; i++)
	{
		scanf("%d", &a[i]);
		if (i >= 2)
		{
			for (int j = 1; j < i; j++)
			{
				int t = min(a[j], a[i]) / abs(j - i);
				ans2 = min(ans2, t);
			}
		}
	}
	printf("%d", ans2);
	return 0;
}


#include <iostream>
#include <algorithm>
#include <string>

using namespace std;

int a[300100];

int main()
{
	int n, ans1 = 0x3f3f3f3f, ans2 = 0x3f3f3f3f;
	cin >> n;
	for (int i = 1; i <= n; i++)
	{
		cin >> a[i];
		ans1 = min(ans1, a[i]);
	}
	for (int i = 1; i < n; i++)
	{
		int t = min(a[i], a[n]) / (n - i);
		ans2 = min(ans2, t);
	}
	for (int i = ans1; i >= 0; i--)
	{
		if (i <= ans2)
		{
			cout << i;
			break;
		}
	}
	return 0;
}


#include <iostream>
#include <algorithm>
#include <string>

using namespace std;

int a[300100];

int main()
{
	int n, ans2 = 0x3f3f3f3f, c = 0;
	cin >> n;
	for (int i = 1; i <= n; i++)
	{
		cin >> a[i];
		if (i >= 2)
		{
			for (int j = 1; j < i; j++)
			{
				int t = min(a[j], a[i]) / abs(j - i);
				ans2 = min(ans2, t);
			}
		}
	}
	cout << ans2;
	return 0;
}


#include <iostream>
#include <algorithm>
#include <string>

using namespace std;

int a[300000];

int main()
{
	int n, ans1 = 0x3f3f3f3f;
	cin >> n;
	for (int i = 0; i < n; i++)
	{
		cin >> a[i];
		ans1 = min(ans1, a[i]);
	}
	for (int i = ans1; i >= 0; i--)
	{
		int flag = 0;
		for (int j = 0; j < n - 1; j++)
		{
			for (int k = j + 1; k < n; k++)
			{
				long long int t = i * abs(j - k);
				if (t > min(a[j], a[k]))
				{
					flag = 1;
					break;
				}
			}
			if (flag)
				break;
		}
		if (flag == 0)
		{
			cout << i;
			break;
		}
	}
	return 0;
}


#include <iostream>
#include <algorithm>
#include <string>

using namespace std;

int a[300100];

int main()
{
	int n, ans1 = 0x3f3f3f3f, ans2 = 0x3f3f3f3f, c = 0;
	cin >> n;
	for (int i = 1; i <= n; i++)
	{
		cin >> a[i];
		if (a[i] < ans1)
		{
			ans1 = a[i];
			c = i;
		}
	}
	for (int j = 1; j <= n - 1; j++)
	{
		for (int k = c; k <= n; k++)
		{
			if (j == k)
				continue;
			int t = min(a[j], a[k]) / abs(j - k);
			ans2 = min(ans2, t);
		}
	}
	for (int i = ans1; i >= 0; i--)
	{
		if (i <= ans2)
		{
			cout << i;
			break;
		}
	}
	return 0;
}


#include <iostream>
#include <string>
#include <vector>
#include <algorithm>

using namespace std;

unsigned getMaxDiff(unsigned n, unsigned index) {
	return max((n - 1 - index), (index - 0));
}

int main()
{
	unsigned n;
	cin >> n;
	vector<unsigned> data(n);
	for (int i = 0; i < n; ++i) cin >> data[i];

	int k = -1;
	for (int i = 0; i < n; ++i) {
		auto max_index_diff = getMaxDiff(n, i);
		auto ki = data[i] / max_index_diff;
		if (k == -1 || k > ki) k = ki;
	}

	cout << k << endl;

	return 0;
}


#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <set>
#include <map>
#include <cmath>
#include <queue>
#include <iomanip>
#include <bitset>
#include <unordered_map>
#include <stack>
#include <memory.h>
#include <list>
#include <numeric>
#include <functional>
#include <complex>
#include <cassert>
#include <regex>
#include <random>

#define ll long long
#define ld long double
#define ull unsigned ll
#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()
#define pii pair<int,int>
#define vi vector<int>
#define vpii vector<pii>
#define vvi vector<vector<int>>
#define forn(it,from,to) for(int (it)=from; (it)<to; (it)++)
const int  Inf = 2 * 1000 * 1000 * 1000;
ll LINF = (ll)4e18;
using namespace std;

int main() {
#ifdef _DEBUG
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#else
	//freopen("sum.in", "r", stdin);
	//freopen("sum.out", "w", stdout);
	//freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);
#endif
	ios::sync_with_stdio(false);
	cin.tie(0); cout.tie(0);
	int n;
	cin >> n;
	vector<int> vc(n);
	int mni, mn=2e9;
	for (int i = 0; i < n; i++) {
		cin >> vc[i];
		if (vc[i] < mn) {
			mn = vc[i];
			mni =i;
		}
	}
	ll ans =min(mn, min(vc[0], vc[n-1])/n);

	cout << ans;
	return 0;
}


#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <set>
#include <map>
#include <cmath>
#include <queue>
#include <iomanip>
#include <bitset>
#include <unordered_map>
#include <stack>
#include <memory.h>
#include <list>
#include <numeric>
#include <functional>
#include <complex>
#include <cassert>
#include <regex>
#include <random>

#define ll long long
#define ld long double
#define ull unsigned ll
#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()
#define pii pair<int,int>
#define vi vector<int>
#define vpii vector<pii>
#define vvi vector<vector<int>>
#define forn(it,from,to) for(int (it)=from; (it)<to; (it)++)
const int  Inf = 2 * 1000 * 1000 * 1000;
ll LINF = (ll)4e18;
using namespace std;

int main() {
#ifdef _DEBUG
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#else
	//freopen("sum.in", "r", stdin);
	//freopen("sum.out", "w", stdout);
	//freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);
#endif
	ios::sync_with_stdio(false);
	cin.tie(0); cout.tie(0);
	int n;
	cin >> n;
	vector<int> vc(n);
	int mni, mn=2e9;
	for (int i = 0; i < n; i++) {
		cin >> vc[i];
		if (vc[i] < mn) {
			mn = vc[i];
			mni =i;
		}
	}
	ll ans =min(mn, min(vc[0], vc[n-1])/(n-1));

	cout << ans;
	return 0;
}


#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <set>
#include <map>
#include <cmath>
#include <queue>
#include <iomanip>
#include <bitset>
#include <unordered_map>
#include <stack>
#include <memory.h>
#include <list>
#include <numeric>
#include <functional>
#include <complex>
#include <cassert>
#include <regex>
#include <random>

#define ll long long
#define ld long double
#define ull unsigned ll
#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()
#define pii pair<int,int>
#define vi vector<int>
#define vpii vector<pii>
#define vvi vector<vector<int>>
#define forn(it,from,to) for(int (it)=from; (it)<to; (it)++)
const int  Inf = 2 * 1000 * 1000 * 1000;
ll LINF = (ll)4e18;
using namespace std;

int main() {
#ifdef _DEBUG
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#else
	//freopen("sum.in", "r", stdin);
	//freopen("sum.out", "w", stdout);
	//freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);
#endif
	ios::sync_with_stdio(false);
	cin.tie(0); cout.tie(0);
	int n;
	cin >> n;
	vector<int> vc(n);
	int mni, mn=2e9;
	for (int i = 0; i < n; i++) {
		cin >> vc[i];
		vc[i] = vc[i] / max(i, n - i - 1);
	}
	sort(vc.begin(), vc.end());

	cout << vc[0];
	return 0;
}


#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <set>
#include <map>
#include <cmath>
#include <queue>
#include <iomanip>
#include <bitset>
#include <unordered_map>
#include <stack>
#include <memory.h>
#include <list>
#include <numeric>
#include <functional>
#include <complex>
#include <cassert>
#include <regex>
#include <random>

#define ll long long
#define ld long double
#define ull unsigned ll
#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()
#define pii pair<int,int>
#define vi vector<int>
#define vpii vector<pii>
#define vvi vector<vector<int>>
#define forn(it,from,to) for(int (it)=from; (it)<to; (it)++)
const int  Inf = 2 * 1000 * 1000 * 1000;
ll LINF = (ll)4e18;
using namespace std;

int main() {
#ifdef _DEBUG
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#else
	//freopen("sum.in", "r", stdin);
	//freopen("sum.out", "w", stdout);
	//freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);
#endif
	ios::sync_with_stdio(false);
	cin.tie(0); cout.tie(0);
	int n;
	cin >> n;
	vector<int> vc(n);
	int mni, mn=2e9;
	for (int i = 0; i < n; i++) {
		cin >> vc[i];
		if (vc[i] < mn) {
			mn = vc[i];
			mni =i;
		}
	}
	ll ans =min(vc[0], vc[n-1])/(n-1);
	for (int i = 0; i < n; i++) {
		if (i != mni) {
			ans = min(ans, ll(mn / abs(i - mni)));
		}
	}
	cout << ans;
	return 0;
}


#include <cstdio>
#include <cstring>
#include <cassert>
#include <cmath>

#include <algorithm>
#include <queue>
#include <functional>
#include <stack>
#include <vector>
#include <tuple>
#include <iostream>
#include <map>
#include <string>
#include <deque>
#include <set>

using namespace std;

using lint = long long;

using ii = pair < int, int >;
using ll = pair < lint, lint >;
using ti = tuple < int, int, int >;
using il = pair < int, lint >;

#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(), v.rend()
#define sc(x) scanf("%d", &x)
#define pf(x) printf("%d",x)
#define ps() puts("")
#define fo(i,n) for(int i=0;i<n;i++)

const int N = 1e6 + 5;
const int M = 1e2 + 5;
int n, m, k;
char s[N];
int a[N], b[N];

int get(int x, int y) {

	int re = 0;
	int l = 0, r = 1e9;
	while (l <= r) {
		int m = (l + r) / 2;
		if (m * x <= y) {
			re = max(re, m);
			l = m + 1;
		}
		else {
			r = m - 1;
		}
	}
	//printf("%d %d %d\n", x, y, re);
	return re;
}

void input() {
	sc(n);
	for (int i = 0; i < n; i++) {
		sc(a[i]);
	}
	int ans = 1e9;
	for (int i = 0; i < n; i++) {
		if (0 != i) {
			ans = min(ans, get(i, min(a[i], a[0])));
		}
		if (n - 1 != i) {
			ans = min(ans, get(n - 1 - i, min(a[0], a[i])));
		}
	}
	printf("%d\n", ans);
}

void go() {

}

#define D

int main() {
#ifdef Da
	freopen("in.txt", "r", stdin);
#endif
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	input();
	go();
}


#include <cstdio>
#include <cstring>
#include <cassert>
#include <cmath>

#include <algorithm>
#include <queue>
#include <functional>
#include <stack>
#include <vector>
#include <tuple>
#include <iostream>
#include <map>
#include <string>
#include <deque>
#include <set>

using namespace std;

using lint = long long;

using ii = pair < int, int >;
using ll = pair < lint, lint >;
using ti = tuple < int, int, int >;
using il = pair < int, lint >;

#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(), v.rend()
#define sc(x) scanf("%d", &x)
#define pf(x) printf("%d",x)
#define ps() puts("")
#define fo(i,n) for(int i=0;i<n;i++)

const int N = 1e6 + 5;
const int M = 1e2 + 5;
int n, m, k;
char s[N];
int a[N], b[N];

int get(int x, int y) {
	int re = 0;
	int l = 0, r = 1e9;
	while (l <= r) {
		int m = (l + r) / 2;
		if ((lint)m * x <= (lint)y) {
			re = max(re, m);
			l = m + 1;
		}
		else {
			r = m - 1;
		}
	}
	return re;
}

void input() {
	sc(n);
	for (int i = 0; i < n; i++) {
		sc(a[i]);
	}
	int ans = 1e9;
	for (int i = 0; i < n; i++) {
		if (0 != i) {
			ans = min(ans, get(i, min(a[i], a[0])));
		}
		if (n - 1 != i) {
			ans = min(ans, get(n - 1 - i, min(a[i], a[n-1])));
		}
	}
	printf("%d\n", ans);
}

void go() {

}

#define D

int main() {
#ifdef Da
	freopen("in.txt", "r", stdin);
#endif
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	input();
	go();
}


#include <cstdio>
#include <cstring>
#include <cassert>
#include <cmath>

#include <algorithm>
#include <queue>
#include <functional>
#include <stack>
#include <vector>
#include <tuple>
#include <iostream>
#include <map>
#include <string>
#include <deque>
#include <set>

using namespace std;

using lint = long long;

using ii = pair < int, int >;
using ll = pair < lint, lint >;
using ti = tuple < int, int, int >;
using il = pair < int, lint >;

#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(), v.rend()
#define sc(x) scanf("%d", &x)
#define pf(x) printf("%d",x)
#define ps() puts("")
#define fo(i,n) for(int i=0;i<n;i++)

const int N = 1e6 + 5;
const int M = 1e2 + 5;
int n, m, k;
char s[N];
int a[N], b[N];

int get(int x, int y) {
	int re = 0;
	int l = 0, r = 1e9;
	while (l <= r) {
		int m = (l + r) / 2;
		if (m * x <= y) {
			re = max(re, m);
			l = m + 1;
		}
		else {
			r = m - 1;
		}
	}
	return re;
}

void input() {
	sc(n);
	for (int i = 0; i < n; i++) {
		sc(a[i]);
	}
	int ans = 1e9;
	for (int i = 0; i < n; i++) {
		if (0 != i) {
			ans = min(ans, get(i, min(a[i], a[0])));
		}
		if (n - 1 != i) {
			ans = min(ans, get(n - 1 - i, min(a[i], a[n-1])));
		}
	}
	printf("%d\n", ans);
}

void go() {

}

#define D

int main() {
#ifdef Da
	freopen("in.txt", "r", stdin);
#endif
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	input();
	go();
}


#include <cstdio>
#include <cstring>
#include <cassert>
#include <cmath>

#include <algorithm>
#include <queue>
#include <functional>
#include <stack>
#include <vector>
#include <tuple>
#include <iostream>
#include <map>
#include <string>
#include <deque>
#include <set>

using namespace std;

using lint = long long;

using ii = pair < int, int >;
using ll = pair < lint, lint >;
using ti = tuple < int, int, int >;
using il = pair < int, lint >;

#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(), v.rend()
#define sc(x) scanf("%d", &x)
#define pf(x) printf("%d",x)
#define ps() puts("")
#define fo(i,n) for(int i=0;i<n;i++)

const int N = 1e6 + 5;
const int M = 1e2 + 5;
int n, m, k;
char s[N];
int a[N], b[N];

int get(int x, int y) {

	int re = 0;
	int l = 0, r = 1e9;
	while (l <= r) {
		int m = (l + r) / 2;
		if (m * x <= y) {
			re = max(re, m);
			l = m + 1;
		}
		else {
			r = m - 1;
		}
	}
	//printf("%d %d %d\n", x, y, re);
	return re;
}

void input() {
	sc(n);
	for (int i = 0; i < n; i++) {
		sc(a[i]);
	}
	int ans = 1e9;
	for (int i = 0; i < n; i++) {
		if (0 != i) {
			ans = min(ans, get(i, a[i]));
		}
		if (n - 1 != i) {
			ans = min(ans, get(n - 1 - i, a[i]));
		}
	}
	printf("%d\n", ans);
}

void go() {

}

#define D

int main() {
#ifdef Da
	freopen("in.txt", "r", stdin);
#endif
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	input();
	go();
}


#include<iostream>

using namespace std;

void input(int n, int *arr) {
	for (int i = 0; i < n; i++)
		cin >> arr[i];
}

int max(int a, int b) {
	return (a > b) ? a : b;
}

int min(int a, int b) {
	return (a < b) ? a : b;
}
int findSth(int n, int *arr) {
	int minVal = arr[0], mark = 1;
	for (int i = 0; i < n; i++) {
		if (arr[i] < minVal) {
			mark = i + 1;
			minVal = arr[i];
		}
	}
	int deno = max(mark-1, n - mark);
	int res = minVal / deno;
	for (int i = mark; i < n; i++) {
		int tuso = min(arr[0], arr[i]);
		int mauso = i;
		int tmp = tuso / mauso;
		if (tmp < res)
			res = tmp;
	}
	if (mark >= 2) {
		for (int i = mark - 2; i >= 0; i--) {
			int tuso = min(arr[n - 1], arr[i]);
			int mauso = n - i - 1;
			int tmp = tuso / mauso;
			if (tmp < res)
				res = tmp;
		}
	}
	return res;
}

int main() {
	int n;
	cin >> n;
	int *arr = new int[n];
	input(n, arr);
	cout << findSth(n, arr);
	delete[]arr;
	//system("pause");
	return 0;
}


#include<iostream>
#include<vector>
#include<string>
#include<unordered_map>
#include<cstring>
#include<queue>
#include<algorithm>
using namespace std;

int a[300005];
int b[300005];
int minv[3000005];
int maxv[3000005];

const int INF=10000000;

void build(int k, int l, int r) {
    if(l==r) {
        minv[k]=INF, maxv[k]=-INF;
        return;
    }
    int mid=(l+r)>>1;
    build(k<<1, l, mid);
    build(k<<1|1, mid+1, r);
    minv[k]=INF, maxv[k]=-INF;
}

void update(int k, int l, int r, int p, int val, bool isMin) {
    if(l==r) {
        if(isMin) minv[k]=min(minv[k], val);
        else maxv[k]=max(maxv[k], val);
        return;
    }
    int mid=(l+r)>>1;
    if(p<=mid) update(k<<1, l, mid, p, val, isMin);
    else update(k<<1|1, mid+1, r, p, val, isMin);
    if(isMin) minv[k]=min(minv[k], val);
    else maxv[k]=max(maxv[k], val);
}

void query(int k, int l, int r, int pl, int pr, int& min_res, int& max_res) {
    if(l==pl && r==pr) {
        min_res=minv[k], max_res=maxv[k];
        return;
    }
    int mid=(l+r)>>1;
    int minvl, maxvl, minvr, maxvr;
    if(pr<=mid) query(k<<1, l, mid, pl, pr, min_res, max_res);
    else if(pl>mid) query(k<<1|1, mid+1, r, pl, pr, min_res, max_res);
    else {
        query(k<<1, l, mid, pl, mid, minvl, maxvl);
        query(k<<1|1, mid+1, r, mid+1, pr, minvr, maxvr);
        min_res=min(minvl, minvr);
        max_res=max(maxvl, maxvr);
    }
}

int main() {
    int n;
    cin>>n;
    for(int i=0;i<n;++i) {
        cin>>a[i];
        b[i]=a[i];
    }
    sort(b, b+n);
    int l=unique(b, b+n)-b;
    unordered_map<int,int> map;
    for(int i=0;i<l;++i) map[b[i]]=i+1;
    build(1, 1, l);
    int k=1000000005;
    for(int i=0;i<n;++i) {
        int pos=map[a[i]];
        int mi, ma;
        query(1, 1, l, pos, l, mi, ma);
        if(mi!=INF) k=min(k, a[i]/(i-mi));
        update(1, 1, l, pos, i, true);
    }
    for(int i=n-1;i>=0;--i) {
        int pos=map[a[i]];
        int mi, ma;
        query(1, 1, l, pos, l, mi, ma);
        if(ma!=-INF) k=min(k, a[i]/(ma-i));
        update(1, 1, l, pos, i, false);
    }
    cout<<k<<endl;
}


#include<iostream>
#include<vector>
#include<string>
#include<unordered_map>
#include<cstring>
#include<queue>
#include<algorithm>
using namespace std;

int a[300005];
int b[300005];
unordered_map<int,int> map;
int minv[600005];
int maxv[600005];

const int INF=10000000;

void build(int k, int l, int r) {
    if(l==r) {
        minv[k]=INF, maxv[k]=-INF;
        return;
    }
    int mid=(l+r)>>1;
    build(k<<1, l, mid);
    build(k<<1|1, mid+1, r);
    minv[k]=INF, maxv[k]=-INF;
}

void update(int k, int l, int r, int p, int val, bool isMin) {
    if(l==r) {
        if(isMin) minv[k]=min(minv[k], val);
        else maxv[k]=max(maxv[k], val);
        return;
    }
    int mid=(l+r)>>1;
    if(p<=mid) update(k<<1, l, mid, p, val, isMin);
    else update(k<<1|1, mid+1, r, p, val, isMin);
    if(isMin) minv[k]=min(minv[k], val);
    else maxv[k]=max(maxv[k], val);
}

void query(int k, int l, int r, int pl, int pr, int& min_res, int& max_res) {
    if(l==pl && r==pr) {
        min_res=minv[k], max_res=maxv[k];
        return;
    }
    int mid=(l+r)>>1;
    int minvl, maxvl, minvr, maxvr;
    if(pr<=mid) query(k<<1, l, mid, pl, pr, min_res, max_res);
    else if(pl>mid) query(k<<1|1, mid+1, r, pl, pr, min_res, max_res);
    else {
        query(k<<1, l, mid, pl, mid, minvl, maxvl);
        query(k<<1|1, mid+1, r, mid+1, pr, minvr, maxvr);
        min_res=min(minvl, minvr);
        max_res=max(maxvl, maxvr);
    }
}

int main() {
    int n;
    cin>>n;
    for(int i=0;i<n;++i) {
        cin>>a[i];
        b[i]=a[i];
    }
    sort(b, b+n);
    int l=unique(b, b+n)-b;
    for(int i=0;i<l;++i) map[b[i]]=i+1;
    build(1, 1, l);
    int k=1000000005;
    for(int i=0;i<n;++i) {
        int pos=map[a[i]];
        int mi, ma;
        query(1, 1, l, pos, l, mi, ma);
        if(mi!=INF) k=min(k, a[i]/(i-mi));
        update(1, 1, l, pos, i, true);
    }
    for(int i=n-1;i>=0;--i) {
        int pos=map[a[i]];
        int mi, ma;
        query(1, 1, l, pos, l, mi, ma);
        if(ma!=-INF) k=min(k, a[i]/(ma-i));
        update(1, 1, l, pos, i, false);
    }
    cout<<k<<endl;
}


#include <iostream>
#include <algorithm>
#include <vector>
#include <map>
#include <set>
#include <cmath>
#include <ctime>
#include <stdio.h>
#include <stdarg.h>
#include <string>
#include <fstream>
#include <sstream>

using namespace std;

int main()
{
    int n;
    cin >> n;
    vector<pair<int, int> > v;
    for (int i = 0; i < n; ++i)
    {
        int tmp;
        cin >> tmp;
        v.push_back({tmp, i+1});
    }

    sort(v.begin(), v.end());

    int cur_k = 1e9;
    for (int i = 0; i < n; ++i)
    {
        int ai = v[i].first;
        int pos = v[i].second;
        int mx = max(pos-1, n-pos);
        cur_k = min(cur_k, ai / mx);
    }
    cout << cur_k << endl;
}


#define _CRT_SECURE_NO_DEPRECATE
#include <cstdio>
#include <iostream>
#include <algorithm>
using namespace std;
const int MAXN = 300000;
int a[MAXN + 10];
int main()
{
	int n;
	scanf("%d", &n);
	for (int i = 1; i <= n; i++)
		scanf("%d", &a[i]);
	int k = min(a[1], a[n]) / (n - 1);
	for (int i = 2; i <= n-1; i++)
	{
		k = min(k, min(a[i] , a[1]) / (i - 1));
		k = min(k, min(a[n] , a[i]) / (n - i));
	}
	printf("%d\n", k);
	return 0;
}


#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cmath>
#include <queue>
#include <cstring>
#include <string>
#include <bitset>
#include <stack>
#include <set>
#include <map>
using namespace std;
#define e exp(1.0)
typedef long long ll;
#define MAXN 300005
#define mod 1000000007
#define INF 0x3f3f3f3f
#define fe(i,st,en) for(i = (st);i <= (en);++i)
#define fne(i,st,en) for(i = (st);i < (en);++i)
#define ri register int
#define db double
struct node {
	int x;
	int p;
}a[MAXN];
bool cmp(const node& x, const node& y) {
	return x.x < y.x;
}
int ma[MAXN], mi[MAXN];
int main(){
	int n;
	while (cin >> n) {
		ri i;
		fe(i, 1, n) scanf("%d", &a[i].x), a[i].p = i;
		sort(a + 1, a + n + 1,cmp);
		ma[n + 1] = 0, mi[n + 1] = INF;
		for (i = n; i >= 1; --i) ma[i] = max(a[i].p, ma[i + 1]), mi[i] = min(a[i].p, mi[i + 1]);
		int ans = INF;
		fe(i, 1, n-1) {
			int t = max(abs(a[i].p - ma[i + 1]), abs(a[i].p - mi[i + 1]));
			if (t == 0) {
				ans = 0;
				break;
			}
			int k = a[i].x / t;
			ans = min(ans, k);
		}
		cout << ans << endl;
	}
	return 0;
}


#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cmath>
#include <queue>
#include <cstring>
#include <string>
#include <bitset>
#include <stack>
#include <set>
#include <map>
using namespace std;
#define e exp(1.0)
typedef long long ll;
#define MAXN 300005
#define mod 1000000007
#define INF 0x3f3f3f3f
#define fe(i,st,en) for(i = (st);i <= (en);++i)
#define fne(i,st,en) for(i = (st);i < (en);++i)
#define ri register int
#define db double
struct node {
	int x;
	int p;
}a[MAXN];
bool cmp(const node& x, const node& y) {
	return x.x < y.x;
}
int ma[MAXN], mi[MAXN];
int main(){
	int n;
	while (cin >> n) {
		ri i;
		fe(i, 1, n) scanf("%d", &a[i].x), a[i].p = i;
		sort(a + 1, a + n + 1,cmp);
		ma[n + 1] = 0, mi[n + 1] = INF;
		for (i = n; i >= 1; --i) ma[i] = max(a[i].p, ma[i + 1]), mi[i] = min(a[i].p, mi[i + 1]);
		int ans = INF;
		fe(i, 1, n-1) {
			int t = min(abs(a[i].p - ma[i + 1]), abs(a[i].p - mi[i + 1]));
			if (t == 0) {
				ans = 0;
				break;
			}
			int k = a[i].x / t;
			ans = min(ans, k);
		}
		cout << ans << endl;
	}
	return 0;
}


#include <Windows.h>
#include <iostream>
#include <fstream>
#include <time.h>
#include <conio.h>
#include <algorithm>
#include <utility>
#include <string>
#include <iomanip>
#include <vector>
#include <set>
#include <map>
#include <cstdio>
#include <cstring>

#define ull                    unsigned long long
#define ll                     long long
#define D_sysP                 system("pause")
#define vec                    vector <int>
#define vecll                  vector <ll>
#define vecull                 vector <ull>
#define Dcin_                  cin>>
#define Dout_                  cout<<
#define ScanStr(f)             scanf("%s", s);
#define Print(n)               printf("%d\n", n);
#define _and_                  <<' '<<
#define _ver_                  <<','<<
#define iotrak(i,k,p)          for(i = 0;n<k;k+=p)
#define lotrak(i,k,p)          for(i = 0;n<k;n+=p)
#define TRAK(s,f,p)            for(int i = s; i<f;i+=p)
#define TRAKJ(s,f,p)            for(int j = s; j<f;j+=p)
#define CinTmpll               ll tmp; cin>>tmp

using namespace std;

int dx[4] = { 1, 0,-1, 0 };
int dy[4] = { 0, -1, 0 , 1 };
int odx[8] = { -1, -1, 0, 1, 1, 1, 0, -1 };
int ody[8] = { 0, 1, 1, 1, 0, -1, -1, -1 };

ll Nod(ll a, ll b)
{
	while (a && b)
		if (a >= b)
			a %= b;
		else
			b %= a;
	return a | b;
}

int mas[100005];

using namespace std; int solve() {
	int k = -1; int n; cin >> n;
	int Min = -1, minindx = 0;
	for (int i = 0; i < n; i++) {
		int tmp; cin >> tmp;
		int mk = tmp / max(i, n - 1 - i);
		if (mk < k || k == -1)k = mk;
	}
	cout << k;
	//D_sysP;
	return 0;
} int main() { return solve(); }


#include <Windows.h>
#include <iostream>
#include <fstream>
#include <time.h>
#include <conio.h>
#include <algorithm>
#include <utility>
#include <string>
#include <iomanip>
#include <vector>
#include <set>
#include <map>
#include <cstdio>
#include <cstring>

#define ull                    unsigned long long
#define ll                     long long
#define D_sysP                 system("pause")
#define vec                    vector <int>
#define vecll                  vector <ll>
#define vecull                 vector <ull>
#define Dcin_                  cin>>
#define Dout_                  cout<<
#define ScanStr(f)             scanf("%s", s);
#define Print(n)               printf("%d\n", n);
#define _and_                  <<' '<<
#define _ver_                  <<','<<
#define iotrak(i,k,p)          for(i = 0;n<k;k+=p)
#define lotrak(i,k,p)          for(i = 0;n<k;n+=p)
#define TRAK(s,f,p)            for(int i = s; i<f;i+=p)
#define TRAKJ(s,f,p)            for(int j = s; j<f;j+=p)
#define CinTmpll               ll tmp; cin>>tmp

using namespace std;

int dx[4] = { 1, 0,-1, 0 };
int dy[4] = { 0, -1, 0 , 1 };
int odx[8] = { -1, -1, 0, 1, 1, 1, 0, -1 };
int ody[8] = { 0, 1, 1, 1, 0, -1, -1, -1 };

ll Nod(ll a, ll b)
{
	while (a && b)
		if (a >= b)
			a %= b;
		else
			b %= a;
	return a | b;
}

int mas[100005];

using namespace std; int solve() {
	int k = 0; int n; cin >> n;
	int Min = -1, minindx = 0;
	for (int i = 0; i < n; i++) {
		int tmp; cin >> tmp;
		if (Min == -1 || Min > tmp) {
			Min = tmp;
			minindx = i;
		}
	}
	int rez  = max(minindx, n - 1 - minindx);
	cout << Min / rez;
	//D_sysP;
	return 0;
} int main() { return solve(); }


#include <Windows.h>
#include <iostream>
#include <fstream>
#include <time.h>
#include <conio.h>
#include <algorithm>
#include <utility>
#include <string>
#include <iomanip>
#include <vector>
#include <set>
#include <map>
#include <cstdio>
#include <cstring>
#define ull                    unsigned long long
#define ll                     long long
#define D_sysP                 system("pause")
#define vec                    vector <int>
#define vecll                  vector <ll>
#define vecull                 vector <ull>
#define Dcin_                  cin>>
#define Dout_                  cout<<
#define ScanStr(f)             scanf("%s", s);
#define Print(n)               printf("%d\n", n);
#define _and_                  <<' '<<
#define _ver_                  <<','<<
#define iotrak(i,k,p)          for(i = 0;n<k;k+=p)
#define lotrak(i,k,p)          for(i = 0;n<k;n+=p)
#define TRAK(s,f,p)            for(int i = s; i<f;i+=p)
#define TRAKJ(s,f,p)            for(int j = s; j<f;j+=p)
#define CinTmpll               ll tmp; cin>>tmp

using namespace std;

int dx[4] = { 1, 0,-1, 0 };
int dy[4] = { 0, -1, 0 , 1 };
int odx[8] = { -1, -1, 0, 1, 1, 1, 0, -1 };
int ody[8] = { 0, 1, 1, 1, 0, -1, -1, -1 };

ll Nod(ll a, ll b)
{
	while (a && b)
		if (a >= b)
			a %= b;
		else
			b %= a;
	return a | b;
}

int mas[100005];

using namespace std; int solve() {
	int k = 0; int n; cin >> n;
	int Min = -1, minindx = 0;
	for (int i = 0; i < n; i++) {
		int tmp; cin >> tmp;
		if (Min == -1 || Min > tmp) {
			Min = tmp;
			minindx = i;
		}
	}
	int rez  = max(minindx, n - minindx);
	cout << Min / rez;
	//D_sysP;
	return 0;
} int main() { return solve(); }


#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <map>
#include <set>

using namespace std;

#define LL long long
#define L long
#define pb push_back
#define vi vector<int>
#define vvi vector<vector<int>>
#define vs vector<string>
#define vvb vector<vector<bool>>
#define vll vector<LL>
#define vvll vector<vector<LL>>

int main()
{

	int n;
	cin >> n;
	vi A(n);
	for (int i = 0; i < n; i++)
	{
		cin >> A[i];
	}
	int result = min(A[0], A[n - 1]) / (n - 1);
	for (int i = 1; i < n - 1; i++)
	{
		int k1 = min(A[i], A[0]) / i;
		int k2 = min(A[i], A[n - 1]) / (n - 1 - i);

		result = min(min(k1, k2), result);
	}
	cout << result;
	return 0;
}


#include <iostream>
#include <vector>
#include <utility>
#include <algorithm>
#include <string>
#include <set>
#include <math.h>
#include <iomanip>
#include <fstream>
using namespace std;
int main() {
	int n;
	cin >> n;
	long long* a = new long long[n+1];
	a[0] = -1;
	for (int i = 1; i <= n; i++) {
		cin >> a[i];
	}
	long long k = 999999999999;
	for (int i = 1; i <= n; i++) {
		long long curr = a[i];
		for (int j = i + 1; j <= n; j++) {
			long long x = fmin(curr, a[j]) / fabs(i-j);
			if (x < k) k = x;
		}
	}
	cout << k << endl;

	return 0;
}


#include <iostream>
#include <vector>
#include <utility>
#include <algorithm>
#include <string>
#include <set>
#include <math.h>
#include <iomanip>
#include <fstream>
using namespace std;
int main() {
	int n;
	cin >> n;
	int* a = new int[n+1];
	a[0] = -1;
	for (int i = 1; i <= n; i++) {
		cin >> a[i];
	}
	int k = 99999;
	for (int i = 1; i <= n; i++) {
		int curr = a[i];
		for (int j = i + 1; j <= n; j++) {
			int x = fmin(a[i], a[j]) / fabs(i-j);
			if (x < k) k = x;
		}
	}
	cout << k << endl;

	return 0;
}


#include <iostream>
#include <vector>
#include <utility>
#include <algorithm>
#include <string>
#include <set>
#include <math.h>
#include <iomanip>
#include <fstream>
using namespace std;
int main() {
	int n;
	cin >> n;
	long long* a = new long long[n+1];
	a[0] = -1;
	long long k = 999999999999;
	//long long min = 999999999999;
	//vector<long> v;
	for (int i = 1; i <= n; i++) {
		cin >> a[i];
		//if (a[i] < min) min = a[i];
		//v.push_back(a[i]);
	//	for (int j = 0; j < v.size()-1; j++) {
			//long long x = fmin(v[j], a[i]) / fabs(i - (j+1) );
			//if (x < k) k = x;
	//	}
	}

	for (int i = 1; i <= n; i++) {
		long long x1 = 9999999999;
		long long x2 = 9999999999;
	//	long long x3 = -1;
		if( i != 1 ) x1 = fmin(a[1], a[i]) / fabs( 1-i );
		if(i != n )x2 = fmin(a[n], a[i]) / fabs( n-i );
		//cout << " x1 " << x1 << " x2 " << x2 << endl;
		long long x = fmin(x1,x2);
		if (x < k) k = x;

	}
	/*
	for (int i = 1; i <= n; i++) {
		long long curr = a[i];
		for (int j = i + 1; j <= n; j++) {
			long long x = fmin(curr, a[j]) / fabs(i-j);
			if (x < k) k = x;
		}
	}
	*/
	cout << setprecision(18)<< k << endl;

	return 0;
}


#include <iostream>
#include <vector>
#include <utility>
#include <algorithm>
#include <string>
#include <set>
#include <math.h>
#include <iomanip>
#include <fstream>
using namespace std;
int main() {
	int n;
	cin >> n;
	long long* a = new long long[n+1];
	a[0] = -1;
	for (int i = 1; i <= n; i++) {
		cin >> a[i];
	}
	long long k = 999999999999;
	for (int i = 1; i <= n; i++) {
		long long curr = a[i];
		for (int j = i + 1; j <= n; j++) {
			long long x = fmin(curr, a[j]) / fabs(i-j);
			if (x < k) k = x;
		}
	}
	cout << setprecision(18)<< k << endl;

	return 0;
}


#include <iostream>
#include <vector>
#include <utility>
#include <algorithm>
#include <string>
#include <set>
#include <math.h>
#include <iomanip>
#include <fstream>
using namespace std;
int main() {
	int n;
	cin >> n;
	long long* a = new long long[n+1];
	a[0] = -1;
	long long k = 999999999999;
	vector<long> v;
	for (int i = 1; i <= n; i++) {
		cin >> a[i];
		v.push_back(a[i]);
		for (int j = 0; j < v.size()-1; j++) {
			long long x = fmin(v[j], a[i]) / fabs(i - (j+1) );
			if (x < k) k = x;
		}
	}

	cout << setprecision(18)<< k << endl;

	return 0;
}


#include <iostream>
#include <algorithm>
using namespace std;

int n, a[300001], k = 1e9, mn = 1e9;

int main()
{
	cin >> n;
	for (int i = 1; i <= n; i++)
		cin >> a[i], mn = min(mn, a[i]);
	for (int i = 1; i <= n; i++)
		if (a[i] == mn)
			k = min(k, mn / max(i-1, n - i+1));
	cout << k;
	return 0;
}


#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

int main()
{
	setlocale(LC_ALL, "RUS");
	int n, mn = pow(10, 9);
	cin >> n;
	vector<int>A(n);
	for (int i = 0; i < n; i++)
		cin >> A[i];
	for (int i = 0; i < n-1; i++)
		for (int u = i + 1; u < n; u++)
		{
			int k = min(A[i], A[u]) / abs(i - u);
			mn = min(mn, k);
		}
cout << mn;
return 0;
}


#include <iostream>
#include <algorithm>
using namespace std;

long long n, k = 1e9, a = 1e9;

int main()
{
	cin >> n;
	for (long long i = 1; i <= n; i++)
			k = min(k, a / max(i - 1, n - i));
	cout << k;
	return 0;
}


#include <iostream>
#include <algorithm>
using namespace std;

long long n, k = 1e9, a = 1e9;

int main()
{
	cin >> n;
	for (long long i = 1; i <= n; i++)
		cin >> a, k = min(k, a / max(i - 1, n - i));
	cout << k;
	return 0;
}


#include <iostream>
#include <algorithm>
using namespace std;

int n, a[300000], k = 1e9;

int main()
{
	cin >> n;
	for (int i = 0; i < n; i++)
		cin >> a[i];
	for (int i = 0; i < n; i++)
		for (int u = i + 1; u < n; u++)
			k = min(k, (min(a[i], a[u]) / (abs(i - u))));
	cout << k;
	return 0;
}


#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

int main()
{
	setlocale(LC_ALL, "RUS");
	int n, j, mn = pow(10, 9);
	cin >> n;
	vector<int>A(n);
	for (int i = 0; i < n; i++)
		cin >> A[i];
	for (int i = 0; i < n-1; i++)
	{
		for (int u = i + 1; u < n; u++)
		{
			j = 1;
			while (j * abs(u - i) <= min(A[u], A[i]))
				j++;
			mn = min(mn, j - 1);
		}
	}
cout << mn;
return 0;
}


#include <iostream>
#include <algorithm>
using namespace std;

long long n, a[300000], k = 1e9;

int main()
{
	cin >> n;
	for (int i = 0; i < n; i++)
		cin >> a[i];
	for (int i = 0; i < n; i++)
		for (int u = i + 1; u < n; u++)
			k = min(k, (min(a[i], a[u]) / (abs(i - u))));
	cout << k;
	return 0;
}


#pragma comment(linker, "/STACK:1000777216")
#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <vector>
#include <algorithm>
#include <map>
#include <set>
#include <string>
#include <queue>
#include <unordered_map>
#include <iterator>
#include <stack>
#include <unordered_set>
#include <iomanip>
#include <cstring>
#include <bitset>
#include<ctime>
using namespace std;

using ll = long long;
using ld = long double;

const int MAXN = 3 * 1e5 + 10;

void precalc()
{

}

int vals[MAXN];

void solve()
{
	int n;
	cin >> n;

	int k = 1e9 + 10;

	for (int i = 1; i <= n; ++i)
	{
		cin >> vals[i];

		int curr = max(i - 1, n - i);

		k = min(k, vals[i] / curr);
	}

	cout << k;
}

int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(0), cout.tie(0);
	cout << fixed << setprecision(20);
#ifndef ONLINE_JUDGE
	freopen("input.in", "r", stdin);
	freopen("output.out", "w", stdout);
#endif
	precalc();
	solve();
#ifdef LOCAL
	cout << '\n' << (double)clock() / CLOCKS_PER_SEC << '\n';
#endif
}