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