#include <bits/stdc++.h>
using namespace std;
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 (y >= (-1) * x + d && y <= x + d && y <= (-1) * x + 2 * n - d &&
        y >= x - d) {
      cout << "YES" << endl;
    } else
      cout << "NO" << endl;
  }
  return 0;
}
