#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, d, k, x, y, i, o;
  cin >> n >> d >> k;
  string a[k];
  i = 0;
  o = k;
  while (k != 0) {
    cin >> x >> y;
    if ((x - y >= -d) && (x - y <= d) && (x + y <= 2 * n - d) && (x + y >= d)) {
      a[i] = "YES";
    } else {
      a[i] = "NO";
    }
    i++;
    k--;
  }
  for (i = 0; i < o; i++) {
    cout << a[i] << endl;
  }
  return 0;
}
