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