#include <bits/stdc++.h>
using namespace std;
int S(int x1, int y1, int x2, int y2, int x3, int y3) {
  return (x2 - x1) * (y3 - y1) - (y2 - y1) * (x3 - x1);
}
int main() {
  int n, d, m, x, y;
  double u;
  cin >> n >> d >> m;
  for (int i = 0; i < m; i++) {
    cin >> x >> y;
    int s1 = S(x, y, 0, d, d, 0);
    int s2 = S(n, n - d, 0, d, d, 0);
    if (s1 * s2 < 0) {
      cout << "NO" << endl;
      continue;
    }
    s1 = S(x, y, d, 0, n, n - d);
    s2 = S(n - d, n, d, 0, n, n - d);
    if (s1 * s2 < 0) {
      cout << "NO" << endl;
      continue;
    }
    s1 = S(x, y, n, n - d, n - d, n);
    s2 = S(0, d, n, n - d, n - d, n);
    if (s1 * s2 < 0) {
      cout << "NO" << endl;
      continue;
    }
    s1 = S(x, y, n - d, n, 0, d);
    s2 = S(d, 0, n - d, n, 0, d);
    if (s1 * s2 < 0) {
      cout << "NO" << endl;
      continue;
    }
    cout << "YES" << endl;
  }
}
