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