import static java.util.Arrays.fill;

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

@SuppressWarnings("unused")
public final class Main {

    public static void main(String[] args) throws IOException {
        new Main().run();
    }

    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));;
    PrintWriter out = new PrintWriter(System.out);
    StringTokenizer st = new StringTokenizer("");

    private void run() throws IOException {
        read();
        solve();
        in.close();
        out.close();
    }

    private final String YES = "YES";
    private final String NO = "NO";

    private int n;
    private int k;
    private int q;
    private int[] t;

    private void solve() throws IOException {
        int[] topVal = new int[k];
        int[] topId = new int[k];
        fill(topId, -1);
        for (int i = 0; i < q; i++) {
            int command = nextInt();
            int id = nextInt() - 1;
            int val = t[id];
            if (command == 1) {
                put(topVal, topId, id, val);
            } else {
                String res = isExists(topId, id) ? YES : NO;
                out.println(res);
            }
        }
    }

    private boolean isExists(int[] a, int e) {
        for (int i = 0; i < a.length; i++) {
            if (a[i] == e) {
                return true;
            }
        }
        return false;
    }

    private void put(int[] topVal, int[] topId, int id, int val) {
        if (val > topVal[0]) {
            topVal[0] = val;
            topId[0] = id;
            for (int i = 1; i < k; i++) {
                if (topVal[i] < topVal[i - 1]) {
                   swap(topVal, i - 1, i);
                   swap(topId, i - 1, i);
                   break;
                }
            }
        }
    }

    private void swap(int[] a, int x, int y) {
        int tmp = a[x];
        a[x] = a[y];
        a[y] = tmp;
    }

    private void read() throws IOException {
        n = nextInt();
        k = nextInt();
        q = nextInt();
        t = new int[n];
        for (int i = 0; i < n; i++) {
            t[i] = nextInt();
        }
    }

    String nextToken() throws IOException {
        while (!st.hasMoreTokens())
            st = new StringTokenizer(in.readLine());
        return st.nextToken();
    }
    int nextInt() throws IOException {
        return Integer.parseInt(nextToken());
    }
    long nextLong() throws IOException {
        return Long.parseLong(nextToken());
    }
    double nextDouble() throws IOException {
        return Double.parseDouble(nextToken());
    }
    String nextLine() throws IOException {
        st = new StringTokenizer("");
        return in.readLine();
    }
}


import static java.util.Arrays.fill;

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

@SuppressWarnings("unused")
public final class Main {

    public static void main(String[] args) throws IOException {
        new Main().run();
    }

    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));;
    PrintWriter out = new PrintWriter(System.out);
    StringTokenizer st = new StringTokenizer("");

    private void run() throws IOException {
        read();
        solve();
        in.close();
        out.close();
    }

    private final String YES = "YES";
    private final String NO = "NO";

    private int n;
    private int k;
    private int q;
    private int[] t;

    private void solve() throws IOException {
        int[] topVal = new int[k];
        int[] topId = new int[k];
        for (int i = 0; i < q; i++) {
            int command = nextInt();
            int id = nextInt() - 1;
            int val = t[id];
            if (command == 1) {
                put(topVal, topId, id, val);
            } else {
                String res = isExists(topId, id) ? YES : NO;
                out.println(res);
            }
        }
    }

    private boolean isExists(int[] a, int e) {
        for (int i = 0; i < a.length; i++) {
            if (a[i] == e) {
                return true;
            }
        }
        return false;
    }

    private void put(int[] topVal, int[] topId, int id, int val) {
        if (val > topVal[0]) {
            topVal[0] = val;
            topId[0] = id;
            for (int i = 1; i < k; i++) {
                if (topVal[i] < topVal[i - 1]) {
                   swap(topVal, i - 1, i);
                   swap(topId, i - 1, i);
                   break;
                }
            }
        }
    }

    private void swap(int[] a, int x, int y) {
        int tmp = a[x];
        a[x] = a[y];
        a[y] = tmp;
    }

    private void read() throws IOException {
        n = nextInt();
        k = nextInt();
        q = nextInt();
        t = new int[n];
        for (int i = 0; i < n; i++) {
            t[i] = nextInt();
        }
    }

    String nextToken() throws IOException {
        while (!st.hasMoreTokens())
            st = new StringTokenizer(in.readLine());
        return st.nextToken();
    }
    int nextInt() throws IOException {
        return Integer.parseInt(nextToken());
    }
    long nextLong() throws IOException {
        return Long.parseLong(nextToken());
    }
    double nextDouble() throws IOException {
        return Double.parseDouble(nextToken());
    }
    String nextLine() throws IOException {
        st = new StringTokenizer("");
        return in.readLine();
    }
}


import java.util.Scanner;

public final class Main {

    static final String LIMAK = "Limak";
    static final String RADEWOOSH = "Radewoosh";
    static final String TIE = "Tie";

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int c = scanner.nextInt();
        int[] p = new int[n];
        int[] t = new int[n];
        for (int i = 0; i < n; i++) {
            p[i] = scanner.nextInt();
        }
        for (int i = 0; i < n; i++) {
            t[i] = scanner.nextInt();
        }

        int totalTimeLimak = 0;
        int totalTimeRadewoosh = 0;
        int limakScore = 0;
        int radewooshScore = 0;

        int limakPenlti, radewooshPenalti, limakP, radewooshP;
        for (int i = 0; i < n; i++) {
            totalTimeLimak += t[i];
            totalTimeRadewoosh += t[n - i - 1];
            limakPenlti = c * totalTimeLimak;
            radewooshPenalti = c * totalTimeRadewoosh;
            limakP = p[i];
            radewooshP = p[n - i - 1];
            limakScore += (limakP > limakPenlti)?(limakP - limakPenlti):0;
            radewooshScore += (radewooshP > radewooshPenalti)?(radewooshP - radewooshPenalti):0;
        }

        if (limakScore > radewooshScore) {
            System.out.println(LIMAK);
        } else {
            if (radewooshScore > limakScore) {
                System.out.println(RADEWOOSH);
            } else {
                System.out.println(TIE);
            }
        }

    }
}


import static java.util.Arrays.fill;

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

@SuppressWarnings("unused")
public final class Main {

    public static void main(String[] args) throws IOException {
        new Main().run();
    }

    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));;
    PrintWriter out = new PrintWriter(System.out);
    StringTokenizer st = new StringTokenizer("");

    private void run() throws IOException {
        read();
        solve();
        in.close();
        out.close();
    }

    private final String YES = "YES";
    private final String NO = "NO";

    private int n;
    private int k;
    private int q;
    private int[] t;

    private void solve() throws IOException {
        int[] topVal = new int[k];
        int[] topId = new int[k];
        fill(topId, -1);
        for (int i = 0; i < q; i++) {
            int command = nextInt();
            int id = nextInt() - 1;
            int val = t[id];
            if (command == 1) {
                put(topVal, topId, id, val);
            } else {
                String res = isExists(topId, id) ? YES : NO;
                out.println(res);
            }
        }
    }

    private boolean isExists(int[] a, int e) {
        for (int i = 0; i < a.length; i++) {
            if (a[i] == e) {
                return true;
            }
        }
        return false;
    }

    private void put(int[] topVal, int[] topId, int id, int val) {
        if (val > topVal[0]) {
            topVal[0] = val;
            topId[0] = id;
            for (int i = 1; i < k; i++) {
                if (topVal[i] < topVal[i - 1]) {
                   swap(topVal, i - 1, i);
                   swap(topId, i - 1, i);
                } else {
                    break;
                }
            }
        }
    }

    private void swap(int[] a, int x, int y) {
        int tmp = a[x];
        a[x] = a[y];
        a[y] = tmp;
    }

    private void read() throws IOException {
        n = nextInt();
        k = nextInt();
        q = nextInt();
        t = new int[n];
        for (int i = 0; i < n; i++) {
            t[i] = nextInt();
        }
    }

    String nextToken() throws IOException {
        while (!st.hasMoreTokens())
            st = new StringTokenizer(in.readLine());
        return st.nextToken();
    }
    int nextInt() throws IOException {
        return Integer.parseInt(nextToken());
    }
    long nextLong() throws IOException {
        return Long.parseLong(nextToken());
    }
    double nextDouble() throws IOException {
        return Double.parseDouble(nextToken());
    }
    String nextLine() throws IOException {
        st = new StringTokenizer("");
        return in.readLine();
    }
}


import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.StreamTokenizer;
import java.util.PriorityQueue;

public class Main {

	private static StreamTokenizer inputReader = new StreamTokenizer(
			new BufferedReader(new InputStreamReader(System.in)));

	public static int nextInt() {
		int a = -1;
		try {
			inputReader.nextToken();
			a = (int) inputReader.nval;
		} catch (Exception e) {
		}
		return a;
	}

	public static void main(String[] args) {
		int numberOFFriends = nextInt();
		int screenSize = nextInt();
		int numberOfQueries = nextInt();

		int[] friendshipVaue = new int[numberOFFriends];
		for (int i = 0; i < numberOFFriends; i++) {
			friendshipVaue[i] = nextInt();
		}

		StringBuilder builder = new StringBuilder();
		PriorityQueue<Integer> queue = new PriorityQueue<>();

		for (int i = 0; i < numberOfQueries; i++) {
			int x = nextInt();
			int y = nextInt();

			if (x == 2) {
				if (queue.contains(friendshipVaue[y - 1])) {
					builder.append("YES" + "\n");
				} else {
					builder.append("NO" + "\n");
				}
			}

			if (x == 1) {
				if (queue.size() <= screenSize) {
					queue.add(friendshipVaue[y - 1]);
				} else {
					queue.poll();
					queue.add(friendshipVaue[y - 1]);
				}
			}
		}

		System.out.println(builder);
	}

}


import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.StreamTokenizer;
import java.util.Iterator;
import java.util.PriorityQueue;

public class Main {

	private static StreamTokenizer inputReader = new StreamTokenizer(
			new BufferedReader(new InputStreamReader(System.in)));

	public static int nextInt() {
		int a = -1;
		try {
			inputReader.nextToken();
			a = (int) inputReader.nval;
		} catch (Exception e) {
		}
		return a;
	}

	public static void main(String[] args) {
		int numberOFFriends = nextInt();
		int screenSize = nextInt();
		int numberOfQueries = nextInt();

		int[] friendshipVaue = new int[numberOFFriends];
		for (int i = 0; i < numberOFFriends; i++) {
			friendshipVaue[i] = nextInt();
		}

		StringBuilder builder = new StringBuilder();
		PriorityQueue<Integer> queue = new PriorityQueue<>();

		int min = Integer.MAX_VALUE;
		for (int i = 0; i < numberOfQueries; i++) {
			int x = nextInt();
			int y = nextInt();

			if (x == 2) {
				if (queue.contains(friendshipVaue[y - 1])) {
					builder.append("YES" + "\n");
				} else {
					builder.append("NO" + "\n");
				}
			}

			if (x == 1) {
				if (queue.size() < screenSize) {
					queue.add(friendshipVaue[y - 1]);
					min = queue.peek();

				} else if (friendshipVaue[y - 1] > min){
					queue.poll();
					queue.add(friendshipVaue[y - 1]);

					min = queue.peek();
				}
			}
		}

		System.out.println(builder);
	}

}


import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.StreamTokenizer;
import java.util.Iterator;
import java.util.PriorityQueue;

public class Main {

	private static StreamTokenizer inputReader = new StreamTokenizer(
			new BufferedReader(new InputStreamReader(System.in)));

	public static int nextInt() {
		int a = -1;
		try {
			inputReader.nextToken();
			a = (int) inputReader.nval;
		} catch (Exception e) {
		}
		return a;
	}

	public static void main(String[] args) {
		int numberOFFriends = nextInt();
		int screenSize = nextInt();
		int numberOfQueries = nextInt();

		int[] friendshipVaue = new int[numberOFFriends];
		for (int i = 0; i < numberOFFriends; i++) {
			friendshipVaue[i] = nextInt();
		}

		StringBuilder builder = new StringBuilder();
		PriorityQueue<Integer> queue = new PriorityQueue<>();

		int min = Integer.MAX_VALUE;
		for (int i = 0; i < numberOfQueries; i++) {
			int x = nextInt();
			int y = nextInt();

			if (x == 2) {
				if (queue.contains(friendshipVaue[y - 1])) {
					builder.append("YES" + "\n");
				} else {
					builder.append("NO" + "\n");
				}
			}

			if (x == 1) {
				if (queue.size() < screenSize) {
					queue.add(friendshipVaue[y - 1]);

					if (friendshipVaue[y - 1] < min) {
						min = friendshipVaue[y - 1];
					}

				} else if (friendshipVaue[y - 1] > min){
					queue.poll();
					queue.add(friendshipVaue[y - 1]);

					for (Integer value : queue) {
						if (value < min) {
							min = value;
						}
					}
				}
			}
		}

		System.out.println(builder);
	}

}


import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.StreamTokenizer;
import java.util.PriorityQueue;

public class Main {

	private static StreamTokenizer inputReader = new StreamTokenizer(
			new BufferedReader(new InputStreamReader(System.in)));

	public static int nextInt() {
		int a = -1;
		try {
			inputReader.nextToken();
			a = (int) inputReader.nval;
		} catch (Exception e) {
		}
		return a;
	}

	public static void main(String[] args) {
		int numberOFFriends = nextInt();
		int screenSize = nextInt();
		int numberOfQueries = nextInt();

		int[] friendshipVaue = new int[numberOFFriends];
		for (int i = 0; i < numberOFFriends; i++) {
			friendshipVaue[i] = nextInt();
		}

		StringBuilder builder = new StringBuilder();
		PriorityQueue<Integer> queue = new PriorityQueue<>();

		for (int i = 0; i < numberOfQueries; i++) {
			int x = nextInt();
			int y = nextInt();

			if (x == 2) {
				if (queue.contains(friendshipVaue[y - 1])) {
					builder.append("YES" + "\n");
				} else {
					builder.append("NO" + "\n");
				}
			}

			if (x == 1) {
				if (queue.size() < screenSize) {
					queue.add(friendshipVaue[y - 1]);
				} else {
					queue.poll();
					queue.add(friendshipVaue[y - 1]);
				}
			}
		}

		System.out.println(builder);
	}

}


import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.StreamTokenizer;
import java.util.PriorityQueue;

public class Main {

	private static StreamTokenizer inputReader = new StreamTokenizer(
			new BufferedReader(new InputStreamReader(System.in)));

	public static int nextInt() {
		int a = -1;
		try {
			inputReader.nextToken();
			a = (int) inputReader.nval;
		} catch (Exception e) {
		}
		return a;
	}

	public static void main(String[] args) {
		int numberOFFriends = nextInt();
		int screenSize = nextInt();
		int numberOfQueries = nextInt();

		int[] friendshipVaue = new int[numberOFFriends];
		for (int i = 0; i < numberOFFriends; i++) {
			friendshipVaue[i] = nextInt();
		}

		StringBuilder builder = new StringBuilder();
		PriorityQueue<Integer> queue = new PriorityQueue<>();

		int min = Integer.MAX_VALUE;
		for (int i = 0; i < numberOfQueries; i++) {
			int x = nextInt();
			int y = nextInt();

			if (x == 2) {
				if (queue.contains(friendshipVaue[y - 1])) {
					builder.append("YES" + "\n");
				} else {
					builder.append("NO" + "\n");
				}
			}

			if (x == 1) {
				if (queue.size() < screenSize) {
					queue.add(friendshipVaue[y - 1]);

					if (friendshipVaue[y - 1] < min) {
						min = friendshipVaue[y - 1];
					}
				} else if (friendshipVaue[y - 1] > min){
					queue.poll();
					queue.add(friendshipVaue[y - 1]);
					min = friendshipVaue[y -1];
				}
			}
		}

		System.out.println(builder);
	}

}


import java.util.*;
public class vkcup2 {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int numFriends = sc.nextInt();
		int maxDisplay = sc.nextInt();
		int numQueries = sc.nextInt();

		int[] friendshipArray = new int[numFriends+1];
		for (int i = 0; i < numFriends; i++){
			friendshipArray[i+1] = sc.nextInt();
		}
		//System.out.println(numQueries);
		TreeMap<Integer, Integer> friendsOnline= new TreeMap<Integer, Integer>();
		for (int i = 0; i < numQueries; i++){

			int queryType = sc.nextInt();
			int friendNum = sc.nextInt();
			//System.out.println(queryType);
			//System.out.println(friendNum);

			if (queryType == 1){
				if (friendsOnline.size() < maxDisplay){
					friendsOnline.put(friendshipArray[friendNum], friendNum);
				}
				//If display is at capacity
				else if (friendsOnline.size() == maxDisplay){
					int lowestScore = friendsOnline.firstKey();

					if (friendshipArray[friendNum] > lowestScore){
						friendsOnline.remove(friendsOnline.firstKey());
						friendsOnline.put(friendshipArray[friendNum], friendNum);
					}
				}
			}else if(queryType == 2){
				if (friendsOnline.containsKey(friendshipArray[friendNum])){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
			}
		}
	}
}


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

public class BearAndDisplayedFriends{
   public static void main(String[] args) throws IOException{
      BufferedReader f = new BufferedReader(new InputStreamReader(System.in));

      StringTokenizer tk = new StringTokenizer(f.readLine());
      int n = Integer.parseInt(tk.nextToken());
      int k = Integer.parseInt(tk.nextToken());
      int q = Integer.parseInt(tk.nextToken());

      int[] onOrNot = new int[n];
      int[] t = new int[n];
      tk = new StringTokenizer(f.readLine());
      for(int j = 0; j < n ; j++){
         t[j] = Integer.parseInt(tk.nextToken());
      }

      int[] online = new int[k];

      for(int qnum = q; qnum --> 0;){
         // for (int j =0; j < k; j++)
      //       System.out.print(online[j] + " ");
      //    System.out.println();
         tk = new StringTokenizer(f.readLine());
         if(tk.nextToken().equals("1")){
            int p = Integer.parseInt(tk.nextToken())-1;
            updateList(online, t[p]); // the t value of the person to add
            onOrNot[p] = 1;
         }
         else{
            int p = Integer.parseInt(tk.nextToken())-1;
            if (onOrNot[p] == 1 && isOnline(online, t[p]))
               System.out.println("YES");
            else
               System.out.println("NO");
         }
      }

   }

   private static boolean isOnline(int[] lst, int t){
      if(t >= lst[lst.length-1])
         return true;
      return false;
   }

   private static void updateList(int[] lst, int t){
      int i = lst.length;
      while( --i > 0 && lst[i] < t){
         lst[i] = lst[i-1];
      }
      if(t > lst[i])
         lst[i] = t;
      else if(i < lst.length-1)
         lst[i+1] = t;
   }
}


import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.io.Writer;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.InputMismatchException;
import java.util.Scanner;

public class Main {
	static int flag=0;
	static String str1;
	static String str2;
	public static int[] a;
	public static void main(String args[]){
		int t=0,n,level,m,w;
		//InputReader in =new InputReader(System.in);
		//OutputWriter out = new OutputWriter(System.out);
		Scanner s=new Scanner(System.in);
		n=s.nextInt();int k=s.nextInt();int q=s.nextInt();
		a=new int[n];
		for(int i=0;i<n;i++)
			a[i]=s.nextInt();
		ArrayList ls=new ArrayList<Integer>();
		HashSet hs=new HashSet();
		score score=new score();
		while(q-->0){
			int x=s.nextInt();int y=s.nextInt();
			if(x==1){
				if(ls.size()<k){
					ls.add(y);
					hs.add(y);
					ls.sort(score);
				}
				else if(a[(int)ls.get(0)-1]<a[y-1]){
					hs.remove((int)ls.get(0));
					hs.add(y);
					ls.set(0, y);
					ls.sort(score);
				}
				//System.out.println(ls);
			}
			else{
				if(hs.contains(y))
					System.out.println("YES");
				else
					System.out.println("NO");
			}
		}
		//out.close();
	}

}

class score implements Comparator{
	Main m =new Main();
	int a[] =m.a;
	@Override
	public int compare(Object o1, Object o2) {
		int x=(int)o1;
		int y=(int)o2;
		return Integer.compare(a[x-1], a[y-1]);
	}

}

//----------------------------------------x----------------------------x---------------------------------------
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 String readString()
	{
		int c = read();
		while (isSpaceChar(c))
			c = read();
		StringBuilder res = new StringBuilder();
		do
		{
			res.appendCodePoint(c);
			c = read();
		} while (!isSpaceChar(c));
		return res.toString();
	}
	public double readDouble() {
		int c = read();
		while (isSpaceChar(c))
			c = read();
		int sgn = 1;
		if (c == '-') {
			sgn = -1;
			c = read();
		}
		double res = 0;
		while (!isSpaceChar(c) && c != '.') {
			if (c == 'e' || c == 'E')
				return res * Math.pow(10, readInt());
			if (c < '0' || c > '9')
				throw new InputMismatchException();
			res *= 10;
			res += c - '0';
			c = read();
		}
		if (c == '.') {
			c = read();
			double m = 1;
			while (!isSpaceChar(c)) {
				if (c == 'e' || c == 'E')
					return res * Math.pow(10, readInt());
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				m /= 10;
				res += (c - '0') * m;
				c = read();
			}
		}
		return res * sgn;
	}
	public long readLong() {
		int c = read();
		while (isSpaceChar(c))
			c = read();
		int sgn = 1;
		if (c == '-') {
			sgn = -1;
			c = read();
		}
		long 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 c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
	}

	public String next()
	{
		return readString();
	}

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

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 flush() {
		writer.flush();
	}

}

class IOUtils {

	public static int[] readIntArray(InputReader in, int size) {
		int[] array = new int[size];
		for (int i = 0; i < size; i++)
			array[i] = in.readInt();
		return array;
	}

}


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

/**
 * Created by danielmckee on 5/1/16.
 */
public class BearDisplayedFriends {
    Scanner in = new Scanner(System.in);
    int n; int k; int q;
    int[] scores;
    ArrayList<Integer> online = new ArrayList<>();

    private void solve() {
        n = in.nextInt();
        k = in.nextInt();
        q = in.nextInt();

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

        handleQueries();
    }

    private void handleQueries() {
        for (int i = 0; i < q; i ++) {
            int type = in.nextInt();
            int id = in.nextInt();
            if (type == 1) {
                if (online.size() < k) {
                    online.add(id);
                } else {
                    int min = 0;
                    int min_id = -1;
                    for (int j = 0; j < online.size(); j++) {
                        if (scores[online.get(j)-1] < min || min < 1) {
                            min = scores[online.get(j) -1];
                            min_id = online.get(j);
                        }
                    }

                    if (scores[id -1] > min) {
                        online.remove(new Integer(min_id));
                        online.add(id);
                    }

                }

            } if (type == 2) {
                if (online.contains(id)) {
                    System.out.println("YES");
                }  else {
                    System.out.println("NO");
                }
            }

        }

    }

    public static void main(String[] args) {
        BearDisplayedFriends b = new BearDisplayedFriends();
        b.solve();
    }
}


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

public class CF658B{
  public static int index;
  public static void main(String[] args)throws Exception {
    InputReader in = new InputReader(System.in);
    PrintWriter pw = new PrintWriter(new OutputStreamWriter(System.out));
    int n = in.nextInt(), k = in.nextInt(), q = in.nextInt();

    int a[] = new int[n+1];
    for(int i = 1; i <= n; i++)
      a[i]= in.nextInt();

    boolean[] mark = new boolean[n+1];

    ArrayList<Pair> list = new ArrayList<Pair>();

    for(int i = 0; i < q; i++){
      int id = in.nextInt(), num = in.nextInt();
     // System.err.println(id+" "+num);
      if(id == 1){
        if(list.size() < k){
          list.add(new Pair(num, a[num]));
          mark[num] = true;
        }
        else if(list.get(0).t < a[num]){
          mark[list.get(0).idx] = false;
          list.remove(0);
          list.add(new Pair(num, a[num]));
          mark[num] = true;
        }
        Collections.sort(list);
//        for(Pair p: list) System.out.print(p.idx+" ");
//        System.err.println();
      }

      else{
        if(mark[num]) pw.println("YES");
        else pw.println("NO");
      }
    }

    pw.close();
  }

static class Pair implements Comparable<Pair>{
  public int t;
  public int idx;
  public Pair(int idxx, int tt){
    idx = idxx; t =tt;
  }
  public int compareTo(Pair p) {
    return this.t-p.t;
 }
}

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

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

    public String next() {

      try {
        while (tokenizer == null || !tokenizer.hasMoreTokens())
          tokenizer = new StringTokenizer(reader.readLine());
      } catch (IOException e) {
        return null;
      }

      return tokenizer.nextToken();
    }

    public String nextLine() {
      String line = null;
      try {
        tokenizer = null;
        line =  reader.readLine();
      } catch (IOException e) {
        throw new RuntimeException(e);
      }
      return line;
    }

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

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

    public long nextLong() {
      return Long.parseLong(next());
    }
    public boolean hasNext(){
      try {
        while (tokenizer == null || !tokenizer.hasMoreTokens())
          tokenizer = new StringTokenizer(reader.readLine());
      }
      catch (Exception e) {
        return false;
      }

    return true;

    }
  }
}


import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
import java.util.TreeSet;

public class P658B
{
	public static void main(String[] args) throws Exception
	{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer(br.readLine());
		int friends = Integer.parseInt(st.nextToken());
		int max = Integer.parseInt(st.nextToken());
		int queries = Integer.parseInt(st.nextToken());

		int[] relation = new int[friends];
		st = new StringTokenizer(br.readLine());
		for (int i = 0; i < friends; i++)
			relation[i] = Integer.parseInt(st.nextToken());

		TreeSet<Query> set = new TreeSet<Query>();
		for (int i = 1; i <= queries; i++)
		{
			st = new StringTokenizer(br.readLine());
			int type = Integer.parseInt(st.nextToken());
			int ind = Integer.parseInt(st.nextToken())-1;
			int rel = relation[ind];
			Query q = new Query(rel);
			if (type == 1)
			{
				set.add(q);
				if (set.size() > max)
					set.remove(set.last());
			}
			else //type 2
			{
				if (set.contains(q))
					System.out.println("YES");
				else
					System.out.println("NO");
			}
		}

		br.close();
	}
}

class Query implements Comparable<Query>
{
	int relation;
	public Query(int rel)
	{
		this.relation = rel;
	}
	public boolean equals(Query q)
	{
		return this.relation == q.relation;
	}
	@Override
	public int compareTo(Query q)
	{
		return q.relation - this.relation;
	}

}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
import java.util.PriorityQueue;
import java.util.StringTokenizer;

public class ProB {

	public static void main(String[] args) {
		MyScanner cin = new MyScanner();
		int n = cin.nextInt(), k = cin.nextInt(), q = cin.nextInt();
		PriorityQueue<Test> priorityQueue = new PriorityQueue<>();
		int[] friendship = new int[n];
		List<Integer> listOfOnline = new ArrayList<>(k);

		for (int i = 0; i < n; i++) {
			friendship[i] = cin.nextInt();
		}

		for (int i = 0; i < q; i++) {
			int cmd = cin.nextInt(), id = cin.nextInt();
			switch (cmd) {
			case 1:
				Test input = new Test(id, friendship[id - 1]);
				if (priorityQueue.size() < k) {
					priorityQueue.offer(input);
					listOfOnline.add(id);
				} else if (priorityQueue.peek().getFriendship() < input
						.getFriendship()) {
					listOfOnline.remove((Integer) (priorityQueue.poll().id));

					priorityQueue.offer(input);
					listOfOnline.add(id);
				}
				break;
			case 2:
				System.out.println((listOfOnline.contains(id) ? "YES" : "NO"));
				break;
			}
		}
	}

	private static class MyScanner {
		BufferedReader br;
		StringTokenizer st;

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

class Test implements Comparable<Test> {
	int id;
	int friendship;

	public Test(int id, int friendship) {
		super();
		this.id = id;
		this.friendship = friendship;
	}

	public int getFriendship() {
		return friendship;
	}

	@Override
	public String toString() {
		return String.format("[%d:%d]", id, friendship);
	}

	@Override
	public int compareTo(Test o) {
		return this.friendship - o.friendship;
	}

}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
import java.util.PriorityQueue;
import java.util.StringTokenizer;

public class ProB {

	public static void main(String[] args) {
		MyScanner cin = new MyScanner();
		PrintWriter out = new PrintWriter(System.out);
		int n = cin.nextInt(), k = cin.nextInt(), q = cin.nextInt();
		PriorityQueue<Test> priorityQueue = new PriorityQueue<>();
		int[] friendship = new int[n];
		List<Integer> listOfOnline = new ArrayList<>(k);

		for (int i = 0; i < n; i++) {
			friendship[i] = cin.nextInt();
		}

		for (int i = 0; i < q; i++) {
			int cmd = cin.nextInt(), id = cin.nextInt();
			switch (cmd) {
			case 1:
				Test input = new Test(id, friendship[id - 1]);
				if (priorityQueue.size() < k) {
					priorityQueue.offer(input);
					listOfOnline.add(id);
				} else if (priorityQueue.peek().getFriendship() < input
						.getFriendship()) {
					listOfOnline.remove((Integer) (priorityQueue.poll().id));

					priorityQueue.offer(input);
					listOfOnline.add(id);
				}
				break;
			case 2:
				out.println((listOfOnline.contains(id) ? "YES" : "NO"));
				break;
			}
		}
		out.close();
	}

	private static class MyScanner {
		BufferedReader br;
		StringTokenizer st;

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

class Test implements Comparable<Test> {
	int id;
	int friendship;

	public Test(int id, int friendship) {
		super();
		this.id = id;
		this.friendship = friendship;
	}

	public int getFriendship() {
		return friendship;
	}

	@Override
	public String toString() {
		return String.format("[%d:%d]", id, friendship);
	}

	@Override
	public int compareTo(Test o) {
		return this.friendship - o.friendship;
	}

}


import java.util.ArrayList;
import java.util.Scanner;

public class ProB {

	public static void main(String[] args) {
		Scanner cin = new Scanner(System.in);
		while (cin.hasNext()) {
			int n = cin.nextInt(), k = cin.nextInt(), q = cin.nextInt();
			int[] friendship = new int[n]; // friendship[i] > t[i+1]
			for (int i = 0; i < n; i++) {
				friendship[i] = cin.nextInt();
			}
			ArrayList<Integer> list = new ArrayList<>(k);
			for (int i = 0; i < q; i++) {
				int cmd = cin.nextInt(), id = cin.nextInt();
				switch (cmd) {
				case 1:
					online(id - 1, list, friendship, k);
					break;
				case 2:
					System.out.println((isOnlist(id - 1, list, k) ? "YES"
							: "NO"));
				default:
					break;
				}

			}
		}
		cin.close();
	}

	private static boolean isOnlist(int i, ArrayList<Integer> list, int k) {
		int maxIndex = Math.min(list.size(), k);
		for (int j = 0; j < maxIndex; j++) {
			if (list.get(j).intValue() == i)
				return true;
		}
		return false;
	}

	private static void online(int i, ArrayList<Integer> list,
			int[] friendship, int k) {
		for (int j = 0; j < k; j++) {
			if (list.size() == j) {
				list.add(j, i);
				break;
			} else if (friendship[list.get(j)] < friendship[i]) {
				list.add(j, i);
				break;
			}
		}
	}

}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
import java.util.PriorityQueue;
import java.util.StringTokenizer;

public class ProB {

	public static void main(String[] args) {
		MyScanner cin = new MyScanner();
		PrintWriter out = new PrintWriter(System.out);
		int n = cin.nextInt(), k = cin.nextInt(), q = cin.nextInt();
		PriorityQueue<Test> priorityQueue = new PriorityQueue<>();
		int[] friendship = new int[n];
		List<Integer> listOfOnline = new ArrayList<>(k);

		for (int i = 0; i < n; i++) {
			friendship[i] = cin.nextInt();
		}

		for (int i = 0; i < q; i++) {
			int cmd = cin.nextInt(), id = cin.nextInt();
			switch (cmd) {
			case 1:
				Test input = new Test(id, friendship[id - 1]);
				if (priorityQueue.size() < k) {
					priorityQueue.offer(input);
					listOfOnline.add(id);
				} else if (priorityQueue.peek().getFriendship() < input
						.getFriendship()) {
					listOfOnline.remove((Integer) (priorityQueue.poll().id));

					priorityQueue.offer(input);
					listOfOnline.add(id);
				}
				break;
			case 2:
				out.println((listOfOnline.contains(id) ? "YES" : "NO"));
				break;
			}
		}
	}

	private static class MyScanner {
		BufferedReader br;
		StringTokenizer st;

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

class Test implements Comparable<Test> {
	int id;
	int friendship;

	public Test(int id, int friendship) {
		super();
		this.id = id;
		this.friendship = friendship;
	}

	public int getFriendship() {
		return friendship;
	}

	@Override
	public String toString() {
		return String.format("[%d:%d]", id, friendship);
	}

	@Override
	public int compareTo(Test o) {
		return this.friendship - o.friendship;
	}

}


import java.util.ArrayList;
import java.util.List;
import java.util.PriorityQueue;
import java.util.Scanner;

public class ProB {

	public static void main(String[] args) {
		Scanner cin = new Scanner(System.in);
		while (cin.hasNext()) {
			int n = cin.nextInt(), k = cin.nextInt(), q = cin.nextInt();
			PriorityQueue<Test> priorityQueue = new PriorityQueue<>();
			int[] friendship = new int[n];
			List<Integer> listOfOnline = new ArrayList<>(k);

			for (int i = 0; i < n; i++) {
				friendship[i] = cin.nextInt();
			}

			for (int i = 0; i < q; i++) {
				int cmd = cin.nextInt(), id = cin.nextInt();
				switch (cmd) {
				case 1:
					Test input = new Test(id, friendship[id - 1]);
					if (priorityQueue.size() < k) {
						priorityQueue.offer(input);
						listOfOnline.add(id);
					} else if (priorityQueue.peek().getFriendship() < input
							.getFriendship()) {
						listOfOnline.remove((Integer)(priorityQueue.poll().id));

						priorityQueue.offer(input);
						listOfOnline.add(id);
					}
					break;
				case 2:
					System.out.println((listOfOnline.contains(id) ? "YES"
							: "NO"));
					break;
				}
			}
		}
		cin.close();
	}
}

class Test implements Comparable<Test> {
	int id;
	int friendship;

	public Test(int id, int friendship) {
		super();
		this.id = id;
		this.friendship = friendship;
	}

	public int getFriendship() {
		return friendship;
	}

	@Override
	public String toString() {
		return String.format("[%d:%d]", id, friendship);
	}

	@Override
	public int compareTo(Test o) {
		return this.friendship - o.friendship;
	}

}


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

public class B {
	public static PriorityQueue<Integer> pq;
	public static void main(String[] args) throws IOException {
		FastScanner in= new FastScanner(System.in);
		PrintWriter out= new PrintWriter(System.out);
		int n= in.nextInt();
		int k= in.nextInt();
		int q= in.nextInt();
		int [] v= new int[n];
		for (int i = 0; i < v.length; i++) {
			v[i]= in.nextInt();
		}
		pq= new PriorityQueue<Integer>();
		for(int i= 0; i <q; i++){
			int t= in.nextInt();
			if(t==1){
				int ind= in.nextInt()-1;
				if(pq.size()+1<=k){
					pq.add(v[ind]);
				}
				else{
					pq.add(v[ind]);
					pq.poll();
				}
			}
			else{
				int val= v[in.nextInt()-1];
				if(pq.contains(val)){
					out.println("YES");
				}
				else{
					out.println("NO");
				}
			}
		}
		out.close();
	}
	static class FastScanner{
        BufferedReader br;
        StringTokenizer st;
        public FastScanner(InputStream in) throws IOException{
            br = new BufferedReader(new InputStreamReader(System.in));
            st = new StringTokenizer("");
        }
        public String next() throws IOException {
            if(st.hasMoreTokens())
                return st.nextToken();
            else
                st = new StringTokenizer(br.readLine());
            return next();
        }
        public int nextInt() throws IOException {
            return Integer.parseInt(next());
        }
        public long nextLong() throws IOException {
            return Long.parseLong(next());
        }
        public String nextLine() throws IOException {
            if(!st.hasMoreTokens())
                return br.readLine();
            String ret = st.nextToken();
            while(st.hasMoreTokens())
                ret += " " + st.nextToken();
            return ret;
        }
    }
	static class pair{
		int x;
		int y;
		public pair(int a, int b){
			x= a;
			y=b;
		}
	}
}


import java.util.Collections;
import java.util.HashMap;
import java.util.Scanner;
import java.util.TreeMap;

public class Ques2
{
	public static void main(String[] args)
	{
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		int k = s.nextInt();
		int q = s.nextInt();
		int[] array = new int[n];
		for(int i=0; i<n; i++)
		{
			array[i] = s.nextInt();
		}
		int[] online = new int[n];
		TreeMap<Integer, Integer> map = new TreeMap<>(Collections.reverseOrder());
		for(int i=0;i<q;i++)
		{
			int type = s.nextInt();
			int friend = s.nextInt();
			if(type == 1)
			{
				online[friend-1] = 1;
				map.put(array[friend-1],friend-1);
			}
			else
			{
				if(online[friend-1]==0)
				{
					System.out.println("NO");
				}
				else
				{
					int j=0;
					for(int l : map.keySet())
					{
						//System.out.println(l);
						if(j<k)
						{
							if((friend-1) == map.get(l))
							{
								System.out.println("YES");
								break;
							}
						}
						else
						{
							System.out.println("NO");
							break;
						}
						j++;
					}

				}
			}
		}
	}
}


//package bearanddisplayfriend_vkcup2016;

import java.util.*;

public class BearAndDisplayFriend_VkCup2016 {

    public static int n, k, q, m, nItem;
    public static int[] t = new int[150005];
    public static int[] Pos = new int[150005];
    public static int[] Heap = new int[150005];
    public static boolean[] Lighted = new boolean[150005];

    public static void Push(int v){
        int c, p;
        c = Pos[v];
        if(c == 0){
            nItem++; c = nItem;
        }
        while(true){
            p = c / 2;
            if(p == 0 || t[Heap[p]] <= t[v]) break;
            Heap[c] = Heap[p];
            Pos[Heap[c]] = c;
            c = p;
        }
        Heap[c] = v;
        Pos[v] = c;
    }

    public static int Pop(){
        int ans, p, c, v;
        ans = Heap[1];
        v = Heap[nItem]; nItem--;
        p = 1;
        while(true){
            c = p * 2;
            if(c < nItem && t[Heap[c + 1]] < t[Heap[c]]) c++;
            if(c > nItem || t[Heap[c]] < t[v]) break;
            Heap[p] = Heap[c];
            Pos[Heap[p]] = p;
            p = c;
        }
        Heap[p] = v;
        Pos[v] = p;
        return ans;
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        m = 0; nItem = 0;
        for(int i = 1; i <= 150000; i++){
            Pos[i] = 0; Lighted[i] = false;
        }

        n = sc.nextInt();
        k = sc.nextInt();
        q = sc.nextInt();
        for(int i = 1; i <= n; i++) t[i] = sc.nextInt();
        for(int i = 1; i <= q; i++){
            int type, id;
            type = sc.nextInt();
            id = sc.nextInt();
            if(type == 1){
                if(m < k)
                {
                    Push(id);
                    Lighted[id] = true;
                    m++;
                } else {
                    int u = Heap[1];
                    if(t[u] < t[id]){
                        u = Pop();
                        System.out.println(u);
                        Lighted[u] = false;
                        Push(id);
                        Lighted[id] = true;
                    }
                }
            } else {
                if(!Lighted[id]) System.out.println("NO");
                else System.out.println("YES");
            }
        }
    }

}


//package bearanddisplayfriend_vkcup2016;

import java.util.*;

public class BearAndDisplayFriend_VkCup2016 {

    public static int n, k, q, m, nItem;
    public static int[] t = new int[150005];
    public static int[] List = new int[150005];

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

        n = sc.nextInt();
        k = sc.nextInt();
        q = sc.nextInt();
        for(int i = 1; i <= n; i++) t[i] = sc.nextInt();
        for(int i = 1; i <= q; i++){
            int type, id;
            type = sc.nextInt();
            id = sc.nextInt();
            if(type == 1){
                if(m < k)
                {
                    m++;
                    List[m] = id;
                } else {
                    int Min = 1000000009, Pos = 1;
                    for(int j = 1; j <= m; j++) if(t[List[j]] < Min){
                        Pos = j;
                        Min = t[List[j]];
                    }
                    if(Min < t[id]) List[Pos] = id;
                }
            } else {
                boolean Found = false;
                for(int j = 1; j <= m; j++) if(List[j] == id){
                    System.out.println("YES");
                    Found = true;
                    break;
                }
                if(!Found) System.out.println("NO");
            }
        }
    }

}


//package bearanddisplayfriend_vkcup2016;

import java.util.*;

public class BearAndDisplayFriend_VkCup2016 {

    public static int n, k, q, m, nItem;
    public static int[] t = new int[150005];
    public static int[] Pos = new int[150005];
    public static int[] Heap = new int[150005];
    public static boolean[] Lighted = new boolean[150005];

    public static void Push(int v){
        int c, p;
        c = Pos[v];
        if(c == 0){
            nItem++; c = nItem;
        }
        while(true){
            p = c / 2;
            if(p == 0 || t[Heap[p]] <= t[v]) break;
            Heap[c] = Heap[p];
            Pos[Heap[c]] = c;
            c = p;
        }
        Heap[c] = v;
        Pos[v] = c;
    }

    public static int Pop(){
        int ans, p, c, v;
        ans = Heap[1];
        v = Heap[nItem]; nItem--;
        p = 1;
        while(true){
            c = p * 2;
            if(c < nItem && t[Heap[c + 1]] < t[Heap[c]]) c++;
            if(c > nItem || t[Heap[c]] < t[v]) break;
            Heap[p] = Heap[c];
            Pos[Heap[p]] = p;
            p = c;
        }
        Heap[p] = v;
        Pos[v] = p;
        return ans;
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        m = 0; nItem = 0;
        for(int i = 1; i <= 150000; i++){
            Pos[i] = 0; Lighted[i] = false;
        }

        n = sc.nextInt();
        k = sc.nextInt();
        q = sc.nextInt();
        for(int i = 1; i <= n; i++) t[i] = sc.nextInt();
        for(int i = 1; i <= q; i++){
            int type, id;
            type = sc.nextInt();
            id = sc.nextInt();
            if(type == 1){
                if(m < k)
                {
                    Push(id);
                    Lighted[id] = true;
                    m++;
                } else {
                    int u = Heap[1];
                    if(t[u] < t[id]){
                        u = Pop();
                        //System.out.println(u);
                        Lighted[u] = false;
                        Push(id);
                        Lighted[id] = true;
                    }
                }
            } else {
                if(!Lighted[id]) System.out.println("NO");
                else System.out.println("YES");
            }
        }
    }

}


package bearanddisplayfriend_vkcup2016;

import java.util.*;

public class BearAndDisplayFriend_VkCup2016 {

    public static int n, k, q, m, nItem;
    public static int[] t = new int[150005];
    public static int[] Pos = new int[150005];
    public static int[] Heap = new int[150005];
    public static boolean[] Lighted = new boolean[150005];

    public static void Push(int v){
        int c, p;
        c = Pos[v];
        if(c == 0){
            nItem++; c = nItem;
        }
        while(true){
            p = c / 2;
            if(p == 0 || t[Heap[p]] <= t[v]) break;
            Heap[c] = Heap[p];
            Pos[Heap[c]] = c;
            c = p;
        }
        Heap[c] = v;
        Pos[v] = c;
    }

    public static int Pop(){
        int ans, p, c, v;
        ans = Heap[1];
        v = Heap[nItem]; nItem--;
        p = 1;
        while(true){
            c = p * 2;
            if(c < nItem && t[Heap[c + 1]] < t[Heap[c]]) c++;
            if(c > nItem || t[Heap[c]] < t[v]) break;
            Heap[p] = Heap[c];
            Pos[Heap[p]] = p;
            p = c;
        }
        Heap[p] = v;
        Pos[v] = p;
        return ans;
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        m = 0; nItem = 0;
        for(int i = 1; i <= 150000; i++){
            Pos[i] = 0; Lighted[i] = false;
        }

        n = sc.nextInt();
        k = sc.nextInt();
        q = sc.nextInt();
        for(int i = 1; i <= n; i++) t[i] = sc.nextInt();
        for(int i = 1; i <= q; i++){
            int type, id;
            type = sc.nextInt();
            id = sc.nextInt();
            if(type == 1){
                if(m < k)
                {
                    Push(id);
                    Lighted[id] = true;
                    m++;
                } else {
                    int u = Heap[1];
                    if(t[u] < t[id]){
                        u = Pop();
                        System.out.println(u);
                        Lighted[u] = false;
                        Push(id);
                        Lighted[id] = true;
                    }
                }
            } else {
                if(!Lighted[id]) System.out.println("NO");
                else System.out.println("YES");
            }
        }
    }

}


//package bearanddisplayfriend_vkcup2016;

import java.util.*;

public class BearAndDisplayFriend_VkCup2016 {

    public static int n, k, q, m, nItem;
    public static int[] t = new int[150005];
    public static int[] Pos = new int[150005];
    public static int[] Heap = new int[150005];
    public static boolean[] Lighted = new boolean[150005];

    public static void Push(int v){
        int c, p;
        c = Pos[v];
        if(c == 0){
            nItem++; c = nItem;
        }
        while(true){
            p = c / 2;
            if(p == 0 || t[Heap[p]] <= t[v]) break;
            Heap[c] = Heap[p];
            Pos[Heap[c]] = c;
            c = p;
        }
        Heap[c] = v;
        Pos[v] = c;
    }

    public static int Pop(){
        int ans, p, c, v;
        ans = Heap[1];
        v = Heap[nItem]; nItem--;
        p = 1;
        while(true){
            c = p * 2;
            if(c < nItem && t[Heap[c + 1]] < t [Heap[c]]) c++;
            if(c > nItem || t[Heap[c]] < t[v]) break;
            Heap[p] = Heap[c];
            Pos[Heap[p]] = p;
            p = c;
        }
        Heap[p] = v;
        Pos[v] = p;
        return ans;
    }
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        m = 0; nItem = 0;
        for(int i = 1; i <= 150000; i++){
            Pos[i] = 0; Lighted[i] = false;
        }

        n = sc.nextInt();
        k = sc.nextInt();
        q = sc.nextInt();
        for(int i = 1; i <= n; i++) t[i] = sc.nextInt();
        for(int i = 1; i <= q; i++){
            int type, id;
            type = sc.nextInt();
            id = sc.nextInt();
            if(type == 1){
                if(m < k)
                {
                    Push(id);
                    Lighted[id] = true;
                    m++;
                } else {
                    int u = Pop();
                    //System.out.println(u);
                    Lighted[u] = false;
                    if(t[u] < t[id]){
                        Push(id);
                        Lighted[id] = true;
                    } else {
                        Push(u);
                        Lighted[u] = true;
                    }
                }
            } else {
                if(!Lighted[id]) System.out.println("NO");
                else System.out.println("YES");
            }
        }
    }

}


import java.io.PrintWriter;
import java.util.PriorityQueue;
import java.util.Scanner;

public class BearAndDisplayedFriends {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		int n = scan.nextInt();
		int k = scan.nextInt();
		int ops = scan.nextInt();
		int[] relations = new int[n];
		for(int i = 0; i < n; i++){
			relations[i] = scan.nextInt();
		}
		PriorityQueue<Integer> pq = new PriorityQueue<Integer>();
		for(int i = 0; i < ops; i++){
			int op = scan.nextInt();
			if(op == 1){
				pq.add(relations[scan.nextInt()-1]);
				if(pq.size() > k){
					pq.poll();
				}
			}
			if(op == 2){
				if(pq.contains(relations[scan.nextInt()-1])){
					out.println("YES");
				}
				else{
					out.println("NO");
				}
			}
		}
		out.close();
	}
}


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

public class Main implements Runnable {

    BufferedReader in;
    PrintWriter out;
    StringTokenizer tok = new StringTokenizer("");

    void init() throws FileNotFoundException {
        try {
            in = new BufferedReader(new FileReader("input.txt"));
            out = new PrintWriter("output.txt");
        } catch (Throwable e) {
            in = new BufferedReader(new InputStreamReader(System.in));
            out = new PrintWriter(System.out);
        }
    }

    String readString() throws IOException {
        while (!tok.hasMoreTokens()) {
            try {
                tok = new StringTokenizer(in.readLine());
            } catch (Exception e) {
                return null;
            }
        }
        return tok.nextToken();
    }

    int readInt() throws IOException {
        return Integer.parseInt(readString());
    }

    int[] readIntArray(int size) throws IOException {
        int[] res = new int[size];
        for (int i = 0; i < size; i++) {
            res[i] = readInt();
        }
        return res;
    }

    long readLong() throws IOException {
        return Long.parseLong(readString());
    }

    double readDouble() throws IOException {
        return Double.parseDouble(readString());
    }

    public static void main(String[] args) {
        new Thread(null, new Main(), "", 1l * 200 * 1024 * 1024).start();
    }

    long timeBegin, timeEnd;

    void time() {
        timeEnd = System.currentTimeMillis();
        System.err.println("Time = " + (timeEnd - timeBegin));
    }

    long memoryTotal, memoryFree;

    void memory() {
        memoryFree = Runtime.getRuntime().freeMemory();
        System.err.println("Memory = " + ((memoryTotal - memoryFree) >> 10)
                + " KB");
    }

    public void run() {
        try {
            timeBegin = System.currentTimeMillis();
            memoryTotal = Runtime.getRuntime().freeMemory();
            init();
            solve();
            out.close();
            if (System.getProperty("ONLINE_JUDGE") == null) {
                time();
                memory();
            }
        } catch (Exception e) {
            e.printStackTrace();
            System.exit(-1);
        }
    }
    int[] rating;
    void solve() throws IOException {
        int friendsCount = readInt(), windowSize=readInt(), q=readInt();
        rating = new int[friendsCount+1];
        for (int i=0;i<friendsCount;i++){
            rating[i]=readInt();
        }
        rating[friendsCount]=-1;
        boolean[] awokenFriends = new boolean[friendsCount];
        Arrays.fill(awokenFriends,false);
        Integer[] online = new Integer[windowSize];
        Arrays.fill(online,friendsCount);
        for (int i = 0; i < q; i++) {
            int a = readInt();
            int friend = readInt()-1;
            if (a==1){
                awokenFriends[friend]=true;
                if (rating[friend]>rating[online[0]]) {
                    online[0]=friend;
                    Arrays.sort(online, new Comparator<Integer>() {
                        @Override
                        public int compare(Integer o1, Integer o2) {
                            int q = rating[o1];
                            int p = rating[o2];
                            int result = q-p;
                            return result;
                        }
                    });
                }
            }else{
                if (rating[friend]>=rating[online[0]]&&awokenFriends[friend]) {
                        out.println("YES");
                }else{
                    out.println("NO");
                }
            }
        }
//        for (int i = 0; i < 150000; i++) {
//            out.print(i+" ");
//        }
//        out.println();
//        for (int i = 1; i < 150000; i++) {
//            out.println(1+" "+i);
//        }
    }
}


import java.io.BufferedReader;
import java.io.Closeable;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.Comparator;
import java.util.PriorityQueue;
import java.util.StringTokenizer;

public class BearAndDisplayedFriends implements Closeable {

    private InputReader in = new InputReader(System.in);
    private PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out), true);

    class Friend {
        int id;
        int value;

        Friend(int id, int value) {
            this.id = id;
            this.value = value;
        }

        @Override
        public boolean equals(Object obj) {
            return this.id == ((Friend) obj).id;
        }
    }

    public void solve() {
        int n = in.ni(), k = in.ni(), q = in.ni();
        Friend[] f = new Friend[n + 1];
        for (int i = 1; i <= n; i++) { f[i] = new Friend(i, in.ni()); }
        PriorityQueue<Friend> queue = new PriorityQueue<Friend>(new Comparator<Friend>() {
            @Override
            public int compare(Friend o1, Friend o2) {
                return Integer.compare(o1.value, o2.value);
            }
        });
        for (int i = 0; i < q; i++) {
            int type = in.ni();
            int friendId = in.ni();
            if (type == 1) {
                queue.add(f[friendId]);
                if (queue.size() == k + 1) {
                    queue.remove();
                }
            } else {
                if (queue.contains(new Friend(friendId, -1))) {
                    out.println("YES");
                } else {
                    out.println("NO");
                }
            }
        }

    }

    @Override
    public void close() throws IOException {
        in.close();
        out.close();
    }

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

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        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 int ni() {
            return Integer.parseInt(next());
        }

        public long nl() {
            return Long.parseLong(next());
        }

        public void close() throws IOException {
            reader.close();
        }
    }

    public static void main(String[] args) {
        new BearAndDisplayedFriends().solve();
    }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.text.DecimalFormat;
import java.util.Arrays;
import java.util.Comparator;
import java.util.HashMap;
import java.util.PriorityQueue;

public class Solution{

	public static void main(String[] args) throws NumberFormatException, IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] a = br.readLine().split(" ");
		int n = Integer.parseInt(a[0]);
		int k =Integer.parseInt(a[1]);
		int q =Integer.parseInt(a[2]);
		a = br.readLine().split(" ");
		int[] arr = new int[n];
		for(int i=0;i<n;i++){
			arr[i] = Integer.parseInt(a[i]);
		}

		PriorityQueue<Integer> pq = new PriorityQueue<Integer>();
		HashMap<Integer  , Integer> map = new HashMap<Integer,Integer>();
		for(int i=0;i<q;i++){
			a = br.readLine().split(" ");
			int type = Integer.parseInt(a[0]);
			int id =Integer.parseInt(a[1]);
			if(type == 1){
				if(pq.size() < k){
					pq.add(arr[id-1]);
					map.put(arr[id-1],id);
				}else{

					int pp = pq.peek();
					if(pp < arr[id-1]){
						map.remove(pp);
						map.put(arr[id-1],id);
						pq.add(arr[id-1]);
					}
				}
			}
			else{
				if(map.containsKey(arr[id-1]))
					System.out.println("YES");
				else System.out.println("NO");
			}

		}

	}

}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.text.DecimalFormat;
import java.util.Arrays;
import java.util.Comparator;
import java.util.HashMap;
import java.util.PriorityQueue;

public class Solution{

	public static void main(String[] args) throws NumberFormatException, IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] a = br.readLine().split(" ");
		int n = Integer.parseInt(a[0]);
		int k =Integer.parseInt(a[1]);
		int q =Integer.parseInt(a[2]);
		a = br.readLine().split(" ");
		int[] arr = new int[n];
		for(int i=0;i<n;i++){
			arr[i] = Integer.parseInt(a[i]);
		}

		PriorityQueue<Integer> pq = new PriorityQueue<Integer>();
		HashMap<Integer  , Integer> map = new HashMap<Integer,Integer>();
		for(int i=0;i<q;i++){
			a = br.readLine().split(" ");
			int type = Integer.parseInt(a[0]);
			int id =Integer.parseInt(a[1]);
			if(type == 1){
				if(pq.size() < k){
					pq.add(arr[id-1]);
					map.put(arr[id-1],id);
				}else{
					int pp = pq.remove();
					map.remove(pp);
					map.put(arr[id-1],id);
					pq.add(arr[id-1]);
				}
			}
			else{
				if(map.containsKey(arr[id-1]))
					System.out.println("YES");
				else System.out.println("NO");
			}

		}

	}

}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.text.DecimalFormat;
import java.util.Arrays;
import java.util.Comparator;
import java.util.HashMap;
import java.util.PriorityQueue;

public class Solution{

	public static void main(String[] args) throws NumberFormatException, IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] a = br.readLine().split(" ");
		int n = Integer.parseInt(a[0]);
		int k =Integer.parseInt(a[1]);
		int q =Integer.parseInt(a[2]);
		a = br.readLine().split(" ");
		int[] arr = new int[n];
		for(int i=0;i<n;i++){
			arr[i] = Integer.parseInt(a[i]);
		}

		PriorityQueue<Integer> pq = new PriorityQueue<Integer>();
		HashMap<Integer  , Integer> map = new HashMap<Integer,Integer>();
		for(int i=0;i<q;i++){
			a = br.readLine().split(" ");
			int type = Integer.parseInt(a[0]);
			int id =Integer.parseInt(a[1]);
			if(type == 1){
				if(pq.size() < k){
					pq.add(arr[id-1]);
					map.put(arr[id-1],id);
				}else{

					int pp = pq.peek();
					if(pp < arr[id-1]){
						pq.remove();
						map.remove(pp);
						map.put(arr[id-1],id);
						pq.add(arr[id-1]);
					}
				}
			}
			else{
				if(map.containsKey(arr[id-1]))
					System.out.println("YES");
				else System.out.println("NO");
			}

		}

	}

}


import java.io.*;
import java.util.*;
public class Solve2 {

  public static void main(String[] args) {
	MyScanner scanner = new MyScanner();
	PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out));
	int n = scanner.nextInt();
    int k = scanner.nextInt();
    int q = scanner.nextInt();

	int[] t = new int[n];
	int[] t2 = new int[n];
	for(int i = 0; i < n; i++)
	  t[i] = t2[i] = scanner.nextInt();
	Arrays.sort(t2);
	HashMap<Integer, Integer> map = new HashMap<Integer, Integer>();
	for(int i = 0; i < n; i++) {
	  map.put(t2[i], i + 1);
	}

    int inf = 1000000000;
	Tree tree = new Tree(n + 3);

	for(int i = 0; i < q; i++) {
	  int type = scanner.nextInt();
	  int id = scanner.nextInt() - 1;
	  if (type == 1) {
	    tree.update(map.get(t[id]), 1);
	  } else {
	    //System.out.println(tree.query(map.get(t[id]), n + 2));
		int nr = map.get(t[id]);
	    if(tree.get(nr) > 0 && tree.query(nr, n + 2) <= k)
	      out.println("YES");
		else
          out.println("NO");
	  }
	}
	out.close();
  }
   static  class Tree{
	int n;
	long[] d;
	Tree(int nmin) {
		for(n = 1; n < nmin; n *= 2);
		d = new long[2 * n];
		Arrays.fill(d, 0);
	}
	void update(int i, long x) {
		d[n + i] = x;
		for(int k = (n + i) / 2; k > 0; k >>= 1)
			d[k] = d[k * 2] + d[k * 2 + 1];
	}
	long get(int i) { return d[n + i]; }
	//[l, r)
	long query(int l, int r) {
		long m = 0;
		for(; l != 0 && l + (l&-l) <= r; l += l&-l)
			m = m + d[(n + l) / (l&-l)];
		for(; l < r; r -= r&-r)
			m = m + d[(n + r) / (r&-r) - 1];
		return m;
	}
   }

  public static class MyScanner {
      BufferedReader br;
      StringTokenizer st;

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

   }
}


import java.util.PriorityQueue;
import java.util.Scanner;

public class BearAndDisplayedFriends {

	public static void main(String[] args) {
		BearAndDisplayedFriends sol = new BearAndDisplayedFriends();
		sol.run();
	}

	class Friend implements Comparable<Friend> {
		int id;
		int relation;
		public Friend(int id, int relation) {
			this.id = id;
			this.relation = relation;
		}

		@Override
		public boolean equals(Object obj) {
			if(obj == null) return false;
			if(obj == this) return true;
			if((obj instanceof Friend)) {
				Friend other = (Friend) obj;
				if(other.id == this.id && other.relation == this.relation) {
					return true;
				}
			}
			return false;
		}

		@Override
		public int compareTo(Friend other) {
			return other.relation - this.relation;
		}
	}

	int n, k, q;
	PriorityQueue<Friend> onlineFriendList = new PriorityQueue<>();
	Friend[] friends;

	private void run() {
		Scanner in = new Scanner(System.in);
		n = in.nextInt();
		k = in.nextInt();
		q = in.nextInt();
		friends = new Friend[n + 1]; // 1 indexed
		onlineFriendList.clear();
		for(int id = 1; id <= n; id++) {
			int relation = in.nextInt();
			Friend frnd = new Friend(id, relation);
			friends[id] = frnd;
		}

		for(int qi = 0; qi < q; qi++) {
			int cmd = in.nextInt();
			int id = in.nextInt();

			if(cmd == 1) {
				onlineFriendList.add(friends[id]);
			}else if(cmd == 2) {
				if(isOnDisplay(id)) {
					System.out.println("YES");
				}else {
					System.out.println("NO");
				}
			}
		}
		in.close();
	}

	private boolean isOnDisplay(int id) {
		boolean onDisplay = false;
		if(onlineFriendList.size() > 0) {
			PriorityQueue<Friend> displayList = new PriorityQueue<>();
			int lim = k;
			while(!onlineFriendList.isEmpty() & (lim-- > 0)) {
				Friend frnd = onlineFriendList.poll();
				displayList.add(frnd);
				if(frnd.id == id) {
					onDisplay = true;
					break;
				}
			}
			while(!displayList.isEmpty()) {
				onlineFriendList.add(displayList.poll());
			}
		}
		return onDisplay;
	}

}


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

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskB solver = new TaskB();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskB {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int n = in.nextInt();
            int k = in.nextInt();
            int q = in.nextInt();
            int[] a = new int[n];
            TreeSet<Integer> set = new TreeSet<>();
            for (int i = 0; i < n; i++) {
                a[i] = in.nextInt();
            }
            for (int i = 0; i < q; i++) {
                int t = in.nextInt();
                int id = in.nextInt() - 1;
                if (t == 1) {
                    set.add(a[id]);
                    if (set.size() > k) {
                        set.remove(set.first());
                    }
                } else {
                    if (set.contains(a[id])) out.println("YES");
                    else out.println("NO");
                }
            }
        }

    }

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

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

        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 int nextInt() {
            return Integer.parseInt(next());
        }

    }
}


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

public class B658 {

    public static void main(String[] args)throws Exception{
        IO.init(System.in);

        int n, k, q;
        n = IO.nextInt(); k = IO.nextInt(); q = IO.nextInt();
        int[] d = new int[n];
        for(int i=0;i<n;++i)d[i] = IO.nextInt();

        ArrayList<Integer> al = new ArrayList<>();
        for(int i = 0;i<q;++i){
            int type = IO.nextInt();
            int bear = IO.nextInt()-1;
            int f = d[bear];
            if(type==1){
                if(al.size()<k)al.add(f);
                else{
                    int ind = 0;
                    for(int qq=0;qq<al.size();++qq){
                        if(al.get(qq)<al.get(ind)){
                            ind = qq;
                        }
                    }
                    al.set(ind, f);
                }
            }else{
                boolean ff= false;
                for(int x =0;x<al.size();++x){
                    if(al.get(x)==f){
                        IO.println("YES");
                        ff = true;
                        break;
                    }
                }
                if(!ff)IO.println("NO");
            }
        }
    }

    static class IO {
        static BufferedReader reader;
        static StringTokenizer tokenizer;

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

        static String next() throws IOException {
            while ( ! tokenizer.hasMoreTokens() ) {
                tokenizer = new StringTokenizer(reader.readLine() );
            }
            return tokenizer.nextToken();
        }

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

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

        static void print(Object ... o){
            for(int i=0;i<o.length;++i){
                System.out.print(o[i]);
            }
        }

        static void println(Object ... o){
            for(int i=0;i<o.length;++i){
                System.out.print(o[i]);
            }
            System.out.println();
        }
    }
}


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

public class B658 {

    public static void main(String[] args)throws Exception{
        IO.init(System.in);

        int n, k, q;
        n = IO.nextInt(); k = IO.nextInt(); q = IO.nextInt();
        int[] d = new int[n];
        for(int i=0;i<n;++i)d[i] = IO.nextInt();

        TreeSet<Integer> pq = new TreeSet<>(Comparator.reverseOrder());
        for(int i = 0;i<q;++i){
            int type = IO.nextInt();
            int bear = IO.nextInt()-1;
            int f = d[bear];
            if(type==1){
                pq.add(f);
            }else{
                if(pq.size()<=k){
                    if(pq.contains(f)){
                    IO.println("YES");
                    }else {
                        IO.println("NO");
                    }
                    continue;
                }
                Integer[] a = new Integer[pq.size()];

                Integer[] b = pq.toArray(a);

//                IO.println(Arrays.toString(b));
                if(b[k-1]<=f)IO.println("YES");
                else IO.println("NO");
            }
        }
    }

    static class IO {
        static BufferedReader reader;
        static StringTokenizer tokenizer;

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

        static String next() throws IOException {
            while ( ! tokenizer.hasMoreTokens() ) {
                tokenizer = new StringTokenizer(reader.readLine() );
            }
            return tokenizer.nextToken();
        }

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

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

        static void print(Object ... o){
            for(int i=0;i<o.length;++i){
                System.out.print(o[i]);
            }
        }

        static void println(Object ... o){
            for(int i=0;i<o.length;++i){
                System.out.print(o[i]);
            }
            System.out.println();
        }
    }
}


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

public class B658 {

    public static void main(String[] args)throws Exception{
        IO.init(System.in);

        int n, k, q;
        n = IO.nextInt(); k = IO.nextInt(); q = IO.nextInt();
        int[] d = new int[n];
        for(int i=0;i<n;++i)d[i] = IO.nextInt();

        TreeSet<Integer> pq = new TreeSet<>(Comparator.reverseOrder());
        for(int i = 0;i<q;++i){
            int type = IO.nextInt();
            int bear = IO.nextInt()-1;
            int f = d[bear];
            if(type==1){
                pq.add(f);
            }else{
                if(pq.size()<k){
                    if(pq.contains(f)) IO.println("YES");
                    else IO.println("NO");
                    continue;
                }
                Integer[] a = new Integer[pq.size()];
                Integer[] b = pq.toArray(a);

//                IO.println(Arrays.toString(b));
                if(pq.contains(f) && b[k-1]<=f)IO.println("YES");
                else IO.println("NO");
            }
        }
    }

    static class IO {
        static BufferedReader reader;
        static StringTokenizer tokenizer;

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

        static String next() throws IOException {
            while ( ! tokenizer.hasMoreTokens() ) {
                tokenizer = new StringTokenizer(reader.readLine() );
            }
            return tokenizer.nextToken();
        }

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

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

        static void print(Object ... o){
            for(int i=0;i<o.length;++i){
                System.out.print(o[i]);
            }
        }

        static void println(Object ... o){
            for(int i=0;i<o.length;++i){
                System.out.print(o[i]);
            }
            System.out.println();
        }
    }
}


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

public class B658 {

    public static void main(String[] args)throws Exception{
        IO.init(System.in);

        int n, k, q;
        n = IO.nextInt(); k = IO.nextInt(); q = IO.nextInt();
        int[] d = new int[n];
        for(int i=0;i<n;++i)d[i] = IO.nextInt();

        ArrayList<Integer> al = new ArrayList<>();
        for(int i = 0;i<q;++i){
            int type = IO.nextInt();
            int bear = IO.nextInt()-1;
            int f = d[bear];
            if(type==1){
                if(al.size()<k)al.add(f);
                else{
                    int ind = 0;
                    for(int qq=0;qq<al.size();++qq){
                        if(al.get(qq)<al.get(ind)){
                            ind = qq;
                        }
                    }
                    if(al.get(ind)<f) al.set(ind, f);
                }
            }else{
                boolean ff = false;
                for(int x =0;x<al.size();++x){
                    if(al.get(x)==f){
                        IO.println("YES");
                        ff = true;
                        break;
                    }
                }
                if(!ff)IO.println("NO");
            }
        }
    }

    static class IO {
        static BufferedReader reader;
        static StringTokenizer tokenizer;

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

        static String next() throws IOException {
            while ( ! tokenizer.hasMoreTokens() ) {
                tokenizer = new StringTokenizer(reader.readLine() );
            }
            return tokenizer.nextToken();
        }

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

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

        static void print(Object ... o){
            for(int i=0;i<o.length;++i){
                System.out.print(o[i]);
            }
        }

        static void println(Object ... o){
            for(int i=0;i<o.length;++i){
                System.out.print(o[i]);
            }
            System.out.println();
        }
    }
}


import java.awt.Point;
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.StringTokenizer;

public class b {
	public static void main(String[] args) throws FileNotFoundException {
		MyScanner scan = new MyScanner();
		PrintWriter out = new PrintWriter(System.out);
		int N = scan.nextInt(), k=scan.nextInt(), q = scan.nextInt();
		int[] list = new int[N];
		for(int i=0;i<N;i++)list[i]=scan.nextInt();
		ArrayList<Point> Q = new ArrayList<>();
		for(int i=0;i<q;i++){
			int z = scan.nextInt();
			if(z==1){
				int temp = scan.nextInt();
				int min=0;
				for(int j=0;j<Q.size();j++)min=(Q.size()<k||Q.get(min).y > Q.get(j).y)?j:min;
				if(Q.size()<k||list[temp-1] > Q.get(min).y){
					if(Q.size()==k)Q.remove(min);
					Q.add(new Point(temp, list[temp-1]));
				}
			}else{
				int temp = scan.nextInt();
				if(Q.contains(new Point(temp, list[temp-1]))){
					out.println("YES");
				}else{
					out.println("NO");
				}
			}
		}
		out.close();
	}
	private static class MyScanner {
		BufferedReader br;
		StringTokenizer st;
		public MyScanner() throws FileNotFoundException {
			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());
		}
	}
}


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

public class CF {
	static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	static PrintWriter pw = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));

	public static void main (String[] args) throws IOException {
		String[] split = br.readLine().split(" ");

		int n =  Integer.parseInt(split[0]);
		int k =  Integer.parseInt(split[1]);
		int q =  Integer.parseInt(split[2]);

		split = br.readLine().split(" ");
		int[] closeness = new int[n];

		for(int i = 0; i < split.length; i++) {
			closeness[i] = Integer.parseInt(split[i]);
		}

		ArrayList<Friend> friends = new ArrayList<Friend>();

		for(int z = 0; z < q; z++) {
			split = br.readLine().split(" ");
			int id = Integer.parseInt(split[1]);

			if(split[0].equals("1")) {
				friends.add(new Friend(id, closeness[id - 1]));

				if(friends.size() > k) {
					Collections.sort(friends);
					friends.remove(k);
				}
			}
			else {
				boolean found = false;
				for(int i = 0; i < friends.size(); i++) {
					if(friends.get(i).id == id) {
						found = true;
						break;
					}
				}

				if(found) pw.println("YES");
				else pw.println("NO");
			}
		}

		pw.close();
	}
	public static class Friend implements Comparable<Friend> {
		int id, closeness;

		public Friend(int i, int c) {
			id = i;
			closeness = c;
		}

		public int compareTo(Friend f) {
			return f.closeness - closeness;
		}
	}
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Jaswant Singh[joney_000]
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        FastReader in = new FastReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskB solver = new TaskB();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskB {
        FastReader in;
        PrintWriter out;
        private final int BUFFER = 200005;
        private int[] tempints = new int[BUFFER];

        void set(FastReader in, PrintWriter out) {
            this.in = in;
            this.out = out;
        }

        public void solve(int testNumber, FastReader in, PrintWriter out) {
            set(in, out);
            int n = i();
            int k = i();
            int q = i();
            long ans = 0L;
            int arr[] = new int[8];
            int a[] = is(n);
            int size = 0;
            for (int qq = 1; qq <= q; qq++) {
                int type = i();
                int id = i();
                if (type == 1) {
                    if (arr[size] < a[id] || size < k) {
                        int i = 0;
                        for (i = size; i >= 1; i--) {
                            if (arr[i] < a[id]) arr[i + 1] = arr[i];
                            else break;
                        }
                        arr[i + 1] = a[id];
                        //      for(int j = 1 ; j <= size ; j++){
                        //         out.write(""+arr[j]+" ");
                        //      }
                        size = Math.min(size + 1, k);
                        //     out.write("qry "+qq+" size= "+size+"\n");
                    }
                } else {
                    int ch = 0;
                    for (int i = size; i >= 1; i--) {
                        if (arr[i] == a[id]) ch = 1;

                    }
                    if (ch == 1) {
                        out.write("YES\n");
                    } else {
                        out.write("NO\n");
                    }

                }
            }
            // out.write(""+ans+"");

        }

        int i() {
            //return Integer.parseInt(br.readLine().trim());
            return in.nextInt();
        }

        int[] is(int n) {
            //int arr[] = new int[n+1];
            for (int i = 1; i <= n; i++) tempints[i] = in.nextInt();
            return tempints;
        }

    }

    static class FastReader {
        private InputStream stream;
        private byte[] buf = new byte[4 * 1024];
        private int curChar;
        private int numChars;
        private SpaceCharFilter filter;

        public FastReader(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 nextInt() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if (c == ',') {
                    c = read();
                }
                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);

        }

    }
}


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[150001];

		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];

				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;
import java.io.Reader;

public class Main {

	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[n+1];

		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];

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

				int val = importance[index-1];

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

				while(curIndex>0 && val>importance[ p_queue[curIndex-1] -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[] queue = new int[7];

		boolean[] online = new boolean[150000];

		// int min = Integer.MAX_VALUE;

		int size = 0, pos = 0;

		queue[k] = -1;

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

			int type, id;

			type = Reader.nextInt();
			id = Reader.nextInt();

			--id;

			pos = size;

			// make the one outside the queue offline.
			if (queue[k] != -1)
				online[queue[k]] = false;

			if (type == 1) {

				// insertion sort.
				while (pos > 0 && importance[id] > importance[queue[pos - 1]]) {

					queue[pos] = queue[pos - 1];

					pos--;
				}

				// insert it and make it online.
				queue[pos] = id;
				online[id] = true;

				if (size < k)
					size++;

			}

			else {

				if (online[id])
					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[150001];

		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;
		}

	}

}