#include <bits/stdc++.h>
using namespace std;
enum { N = 400007 };
int n, m, q, f;
map<int, int> H[N];
vector<int> X[N << 2], Y[N << 2], P[N], Q[N];
void upd(int u, int k) {
  for (; u; u &= u - 1) P[u].push_back(max(P[u].back(), k));
}
int pry(int u) {
  int r = 0;
  for (; u <= n; u += u & -u) r = max(r, P[u].back());
  return r;
}
void dpu(int u) {
  for (; u; u &= u - 1) P[u].pop_back();
}
void uqd(int u, int k) {
  for (; u <= n; u += u & -u) Q[u].push_back(min(Q[u].back(), k));
}
void dqu(int u) {
  for (; u <= n; u += u & -u) Q[u].pop_back();
}
int qry(int u) {
  int r = m + 1;
  for (; u; u &= u - 1) r = min(r, Q[u].back());
  return r;
}
void UPD(int l, int r, int x, int y, int u = 1, int L = 1, int R = q) {
  if (l == L && r == R) {
    X[u].push_back(x);
    Y[u].push_back(y);
    return;
  }
  int m = (L + R) >> 1;
  if (r <= m)
    UPD(l, r, x, y, u << 1, L, m);
  else if (l > m)
    UPD(l, r, x, y, u << 1 | 1, m + 1, R);
  else
    UPD(l, m, x, y, u << 1, L, m), UPD(m + 1, r, x, y, u << 1 | 1, m + 1, R);
}
void FLY(int u = 1, int L = 1, int R = q, int f = 0) {
  int go = 0;
  if (!f) go = 1;
  if (go) {
    int s = X[u].size();
    for (int i = 0; i <= s - 1; ++i) {
      int x = X[u][i], y = Y[u][i], o = (x & 1);
      x = (x + 1) / 2, y = (y + 1) / 2;
      if (o) {
        if (pry(x) >= y) f = 1;
        uqd(x, y);
      } else {
        if (qry(x) <= y) f = 1;
        upd(x, y);
      }
    }
  }
  if (L == R) {
    puts(f ? "NO" : "YES");
  } else {
    int m = (L + R) >> 1;
    FLY(u << 1, L, m, f), FLY(u << 1 | 1, m + 1, R, f);
  }
  if (go) {
    int s = X[u].size();
    for (int i = s - 1; i >= 0; --i) {
      int x = X[u][i], y = Y[u][i], o = (x & 1);
      x = (x + 1) / 2, y = (y + 1) / 2;
      if (o) {
        dqu(x);
      } else {
        dpu(x);
      }
    }
  }
}
int main() {
  scanf("%d%d%d", &n, &m, &q);
  for (int i = 1; i <= n; ++i) Q[i].push_back(m + 1), P[i].push_back(0);
  for (int i = 1; i <= q; ++i) {
    int x, y;
    scanf("%d%d", &x, &y);
    if (H[x][y]) {
      UPD(H[x][y], i - 1, x, y);
      H[x][y] = 0;
    } else
      H[x][y] = i;
  }
  for (int i = 1; i <= 2 * n; ++i)
    for (map<int, int>::iterator j = H[i].begin(); j != H[i].end(); ++j)
      if (j->second) UPD(j->second, q, i, j->first);
  FLY();
  return 0;
}
