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