#include <bits/stdc++.h>
using namespace std;
struct point {
  int x, y;
};
int s(point a, point b, point c) {
  point v1 = (point){c.x - b.x, c.y - b.y};
  point v2 = (point){a.x - b.x, a.y - b.y};
  return v1.x * v2.y - v1.y * v2.x;
}
int main() {
  int n, d, m, a, b;
  vector<point> p;
  cin >> n >> d;
  cin >> m;
  for (int i = 0; i < m; ++i) {
    cin >> a >> b;
    p.push_back((point){a, b});
  }
  point v1 = (point){0, d}, v2 = (point){d, 0}, v3 = (point){n, n - d},
        v4 = (point){n - d, n};
  for (auto i : p) {
    if (s(v1, v2, i) >= 0 && s(v2, v3, i) >= 0 && s(v3, v4, i) >= 0 &&
        s(v4, v1, i) >= 0)
      cout << "YES" << '\n';
    else
      cout << "NO" << '\n';
  }
}
