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