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