#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  while (b) {
    a %= b;
    swap(a, b);
  }
  return a;
}
struct Robot {
  int iq, radius, pos;
  bool used;
  Robot(int a, int b, int c) {
    pos = a;
    radius = b;
    iq = c;
    used = false;
  }
  bool operator<(Robot other) { return (*this).pos < other.pos; }
};
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  int n, a, b, c, k, x, y, d, cnt = 0;
  bool flag = true;
  cin >> n >> d >> k;
  for (int i = 0; i < k; ++i) {
    cin >> x >> y;
    if (x + y >= d && x + y <= 2 * n - d && y - x >= -d && y - x <= d) {
      cout << "YES"
           << "\n";
    } else {
      cout << "NO"
           << "\n";
    }
  }
  return 0;
}
