#include <bits/stdc++.h>
using namespace std;
constexpr const long long maxVal = 10e17;
struct Vec {
  long long x, y;
  Vec() {}
  Vec(long long _x, long long _y) : x(_x), y(_y) {}
  Vec(Vec a, Vec b) : x(b.x - a.x), y(b.y - a.y) {}
  long long operator^(Vec other) { return x * other.y - y * other.x; }
};
signed main() {
  vector<Vec> sqr(4);
  long long n, d;
  cin >> n >> d;
  sqr[0] = {0, d};
  sqr[1] = {d, 0};
  sqr[3] = {n - d, n};
  sqr[2] = {n, n - d};
  long long m;
  cin >> m;
  for (long long i = 0; i < m; i++) {
    long long tmpX, tmpY;
    cin >> tmpX >> tmpY;
    Vec pointS(tmpX, tmpY);
    Vec tmp1(sqr[0], sqr[1]);
    Vec tmp2(sqr[0], sqr[3]);
    Vec tmp3(sqr[1], sqr[2]);
    Vec tmp4(sqr[2], sqr[3]);
    Vec point(sqr[0], pointS);
    Vec poin1(sqr[1], pointS);
    Vec poin2(sqr[2], pointS);
    if ((tmp1 ^ point) >= 0) {
      if ((tmp2 ^ point) <= 0) {
        if ((tmp3 ^ poin1) >= 0) {
          if ((tmp4 ^ poin2) >= 0) {
            cout << "YES" << '\n';
          } else {
            cout << "NO" << '\n';
          }
        } else {
          cout << "NO" << '\n';
        }
      } else {
        cout << "NO" << '\n';
      }
    } else {
      cout << "NO" << '\n';
    }
  }
  return 0;
}
