#include <bits/stdc++.h>
using namespace std;
int setCode(int x, int y, int n, int d) {
  int code = 0;
  if (x - d - y > 0) code |= 1;
  if (x - d + y < 0) code |= 1 << 1;
  if (x - y + d < 0) code |= 1 << 3;
  if (x + y - 2 * n + d > 0) code |= 1 << 2;
  return code;
}
int main() {
  int n, d;
  cin >> n >> d;
  int m;
  cin >> m;
  int x[m + 2], y[m + 2];
  for (int i = 0; i < m; i++) {
    cin >> x[i] >> y[i];
  }
  for (int i = 0; i < m; i++) {
    if (setCode(x[i], y[i], n, d))
      cout << "NO\n";
    else
      cout << "YES\n";
  }
}
