#include <bits/stdc++.h>
using namespace std;
int vec(int x1, int y1, int x2, int y2) { return (x1 * y2 - y1 * x2); }
bool solve() {
  int n, d;
  cin >> n >> d;
  int m;
  cin >> m;
  int x0 = 0, y0 = d, y1 = 0, x1 = d, x2 = n, y2 = n - d, x3 = n - d, y3 = n;
  for (int i = 0; i < m; i++) {
    int x, y;
    cin >> x >> y;
    if (vec(x1 - x0, y1 - y0, x - x0, y - y0) >= 0 &&
            vec(x2 - x1, y2 - y1, x - x1, y - y1) >= 0 &&
            vec(x3 - x2, y3 - y2, x - x2, y - y2) >= 0 &&
            vec(x0 - x3, y0 - y3, x - x3, y - y3) >= 0 ||
        vec(x1 - x0, y1 - y0, x - x0, y - y0) <= 0 &&
            vec(x2 - x1, y2 - y1, x - x1, y - y1) <= 0 &&
            vec(x3 - x2, y3 - y2, x - x2, y - y2) <= 0 &&
            vec(x0 - x3, y0 - y3, x - x3, y - y3) <= 0) {
      cout << "YES\n";
    } else
      cout << "NO\n";
  }
  return 1;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  solve();
  return 0;
}
