#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int>> a;
vector<int> l, r;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int d, n, m;
  cin >> n >> d >> m;
  a.resize(m);
  for (int i = 0; i < m; i++) {
    int x, y;
    cin >> x >> y;
    a[i] = {x, y};
  }
  l.resize(n + 100);
  r.resize(n + 100);
  if (d <= n / 2) {
    for (int i = 0; i <= d; i++) {
      l[i] = d - i;
      r[i] = d + i;
    }
    for (int i = d + 1; i <= n - d; i++) {
      l[i] = l[i - 1] + 1;
      r[i] = r[i - 1] + 1;
    }
    for (int i = n - d + 1; i <= n; i++) {
      l[i] = l[i - 1] + 1;
      r[i] = r[i - 1] - 1;
    }
  } else {
    for (int i = 0; i <= n - d; i++) {
      l[i] = d - i;
      r[i] = d + i;
    }
    for (int i = n - d + 1; i <= d; i++) {
      l[i] = l[i - 1] - 1;
      r[i] = r[i - 1] - 1;
    }
    for (int i = d + 1; i <= n; i++) {
      l[i] = l[i - 1] + 1;
      r[i] = r[i - 1] - 1;
    }
  }
  for (int i = 0; i < m; i++) {
    int x = a[i].first;
    int y = a[i].second;
    if (l[x] <= y && y <= r[x]) {
      cout << "YES\n";
    } else {
      cout << "NO\n";
    }
  }
  return 0;
}
