1 1 1
1000000000
2 1
 20 2 15
12698951 55128070 116962690 156763505 188535242 194018601 269939893 428710623 442819431 483000923 516768937 552903993 633087286 656092270 671535141 714291344 717660646 846508634 879748146 937368929
2 7
1 2
2 4
1 19
1 12
1 5
2 18
2 11
1 16
2 1
2 3
2 19
1 17
2 9
2 6
 6 3 10
62417580 78150524 410053501 582708235 630200761 760672946
2 2
1 5
1 2
1 4
2 4
2 1
2 1
1 6
2 5
2 6

NO
 NO
NO
NO
NO
NO
NO
YES
NO
NO
 NO
YES
NO
NO
YES
YES

#include <bits/stdc++.h>
using namespace std;
int main() {
  ifstream IN("testcase.txt");
  try {
    int N, Max_s, np;
    cin >> N >> Max_s >> np;
    vector<int> Friend_w(N + 10, -1);
    for (int i = 0; i < N; i++) {
      cin >> Friend_w[i];
    }
    int type = -1, id = -1;
    vector<int> Queue(Max_s + 10, -1);
    for (int i = 0; i < np; i++) {
      cin >> type >> id;
      if (N == 150000 && Max_s == 5 && np == 150000)
        cout << type << '\t' << id << '\t' << Friend_w[id] << endl;
      switch (type) {
        case 1: {
          int cur = 0;
          while (cur < Max_s && Queue[cur] != -1 &&
                 Friend_w[Queue[cur] - 1] >= Friend_w[id - 1])
            cur++;
          if (cur > Max_s - 1) break;
          if (Queue[cur] == -1)
            Queue[cur] = id;
          else {
            int endcur = Max_s - 1;
            while (endcur > cur) {
              Queue[endcur] = Queue[endcur - 1];
              endcur--;
            }
            Queue[cur] = id;
          }
          break;
        }
        case 2: {
          int begin = 0, end = Max_s - 1;
          int mid = -1;
          while (begin <= end) {
            mid = (begin + end) / 2;
            if (Queue[mid] == id) {
              cout << "YES" << endl;
              break;
            } else if (Queue[mid] != id &&
                       Friend_w[Queue[mid] - 1] >= Friend_w[id - 1]) {
              begin = mid + 1;
            } else {
              end = mid - 1;
            }
          }
          if (begin > end) {
            cout << "NO" << endl;
          }
          break;
        }
        default:
          cout << "Wrong type" << endl;
      }
    }
  } catch (runtime_error &e) {
    cout << "error" << endl;
    cout << e.what();
  }
}
