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1 10 10
2 4
2 8
2 6
1 17
1 9
1 15
2 10
1 11
2 2
1 13
 10 10 10
9 17
9 13
8 10
12 2
18 14
18 6
10 6
13 19
2 12
10 8
 10 10 10
2 6
5 9
5 15
1 19
6 6
8 4
11 9
13 11
4 6
10 2
 10 10 10
16 2
12 6
8 2
12 2
3 15
6 6
7 17
4 16
11 9
2 6
 10 10 10
18 2
15 13
9 19
6 10
20 18
15 19
2 2
11 13
17 13
3 15
 1 2 1
2 2
 1 10 10
2 4
1 13
1 7
2 14
1 19
1 17
2 2
1 15
1 11
2 6
 1 10 10
1 13
2 4
1 5
2 2
1 19
1 11
1 15
1 17
1 7
2 14
 1 10 10
1 17
2 4
2 2
1 11
1 15
1 19
2 6
2 8
2 12
1 13

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

#include <bits/stdc++.h>
#pragma GCC optimize("Ofast", "unroll-loops", "omit-frame-pointer", "inline")
#pragma GCC option("arch=native", "tune=native", "no-zero-upper")
#pragma GCC target("avx2")
#pragma GCC optimize("03")
using namespace std;
template <typename T>
struct STi {
  vector<T> st, lazy;
  int sz;
  T neutroL;
  STi(int n, T neutrol) : sz(n), st(4 * n), lazy(4 * n), neutroL(neutrol) {}
  T merge(T v1, T v2) { return min(v1, v2); }
  void up(int p, int l, int r, T v) {
    st[p] = min(st[p], v);
    lazy[p] = min(lazy[p], v);
  }
  void push(int p, int l, int r) {
    if (l == r) {
      lazy[p] = neutroL;
      return;
    }
    if (lazy[p] == neutroL) return;
    T v = lazy[p];
    up((p << 1), l, (l + r) >> 1, v);
    up((p << 1) + 1, ((l + r) >> 1) + 1, r, v);
    lazy[p] = neutroL;
  }
  void build(vector<T> &arr) { build(1, 0, sz - 1, arr); }
  void build(int p, int l, int r, vector<T> &arr) {
    if (l == r) {
      st[p] = arr[l];
      lazy[p] = neutroL;
      return;
    }
    int mid = (l + r) >> 1;
    build(p << 1, l, mid, arr);
    build((p << 1) + 1, mid + 1, r, arr);
    st[p] = merge(st[p << 1], st[(p << 1) + 1]);
    lazy[p] = neutroL;
  }
  void build(T *arr) { build(1, 0, sz - 1, arr); }
  void build(int p, int l, int r, T *arr) {
    if (l == r) {
      st[p] = arr[l];
      lazy[p] = neutroL;
      return;
    }
    int mid = (l + r) >> 1;
    build(p << 1, l, mid, arr);
    build((p << 1) + 1, mid + 1, r, arr);
    st[p] = merge(st[p << 1], st[(p << 1) + 1]);
    lazy[p] = neutroL;
  }
  void update(int L, int R, T v) { update(1, 0, sz - 1, L, R, v); }
  void update(int p, int l, int r, int L, int R, T v) {
    if (L <= l && r <= R) {
      up(p, l, r, v);
      return;
    }
    push(p, l, r);
    int mid = (l + r) >> 1;
    if (L <= mid) update(p << 1, l, mid, L, R, v);
    if (R > mid) update((p << 1) + 1, mid + 1, r, L, R, v);
    st[p] = merge(st[p << 1], st[(p << 1) + 1]);
  }
  T query(int L, int R) { return query(1, 0, sz - 1, L, R); }
  T query(int p, int l, int r, int L, int R) {
    if (L <= l && r <= R) return st[p];
    push(p, l, r);
    int mid = (l + r) >> 1;
    if (R <= mid) return query(p << 1, l, mid, L, R);
    if (L > mid) return query((p << 1) + 1, mid + 1, r, L, R);
    return merge(query(p << 1, l, mid, L, R),
                 query((p << 1) + 1, mid + 1, r, L, R));
  }
};
template <typename T>
struct STa {
  vector<T> st, lazy;
  int sz;
  T neutroL;
  STa(int n, T neutrol) : sz(n), st(4 * n), lazy(4 * n), neutroL(neutrol) {}
  T merge(T v1, T v2) { return max(v1, v2); }
  void up(int p, int l, int r, T v) {
    st[p] = max(st[p], v);
    lazy[p] = max(lazy[p], v);
  }
  void push(int p, int l, int r) {
    if (l == r) {
      lazy[p] = neutroL;
      return;
    }
    if (lazy[p] == neutroL) return;
    T v = lazy[p];
    up((p << 1), l, (l + r) >> 1, v);
    up((p << 1) + 1, ((l + r) >> 1) + 1, r, v);
    lazy[p] = neutroL;
  }
  void build(vector<T> &arr) { build(1, 0, sz - 1, arr); }
  void build(int p, int l, int r, vector<T> &arr) {
    if (l == r) {
      st[p] = arr[l];
      lazy[p] = neutroL;
      return;
    }
    int mid = (l + r) >> 1;
    build(p << 1, l, mid, arr);
    build((p << 1) + 1, mid + 1, r, arr);
    st[p] = merge(st[p << 1], st[(p << 1) + 1]);
    lazy[p] = neutroL;
  }
  void build(T *arr) { build(1, 0, sz - 1, arr); }
  void build(int p, int l, int r, T *arr) {
    if (l == r) {
      st[p] = arr[l];
      lazy[p] = neutroL;
      return;
    }
    int mid = (l + r) >> 1;
    build(p << 1, l, mid, arr);
    build((p << 1) + 1, mid + 1, r, arr);
    st[p] = merge(st[p << 1], st[(p << 1) + 1]);
    lazy[p] = neutroL;
  }
  void update(int L, int R, T v) { update(1, 0, sz - 1, L, R, v); }
  void update(int p, int l, int r, int L, int R, T v) {
    if (L <= l && r <= R) {
      up(p, l, r, v);
      return;
    }
    push(p, l, r);
    int mid = (l + r) >> 1;
    if (L <= mid) update(p << 1, l, mid, L, R, v);
    if (R > mid) update((p << 1) + 1, mid + 1, r, L, R, v);
    st[p] = merge(st[p << 1], st[(p << 1) + 1]);
  }
  T query(int L, int R) { return query(1, 0, sz - 1, L, R); }
  T query(int p, int l, int r, int L, int R) {
    if (L <= l && r <= R) return st[p];
    push(p, l, r);
    int mid = (l + r) >> 1;
    if (R <= mid) return query(p << 1, l, mid, L, R);
    if (L > mid) return query((p << 1) + 1, mid + 1, r, L, R);
    return merge(query(p << 1, l, mid, L, R),
                 query((p << 1) + 1, mid + 1, r, L, R));
  }
};
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n, m, q;
  cin >> n >> m >> q;
  bool ok = 1;
  vector<int> ini(n, 1e9);
  STi<int> sti(n, 1e9);
  sti.build(ini);
  vector<int> ini2(n, -1);
  STa<int> stp(n, -1);
  stp.build(ini2);
  for (int i = 0; i < q; i++) {
    int x, y;
    cin >> x >> y;
    y = (y - 1) / 2;
    if (x & 1) {
      x = (x - 1) / 2;
      sti.update(x, n - 1, y);
      ok &= (y > stp.query(x, x));
    } else {
      x = (x - 1) / 2;
      stp.update(0, x, y);
      ok &= (y < sti.query(x, x));
    }
    if (ok)
      cout << ("YES") << '\n';
    else
      cout << ("NO") << '\n';
  }
  return 0;
}
