#include <bits/stdc++.h>
using namespace std;
struct point {
  double x;
  double y;
};
double vec(double x1, double y1, double x2, double y2) {
  return x1 * y2 - y1 * x2;
}
int main() {
  int n, d1;
  cin >> n >> d1;
  int m;
  cin >> m;
  point a, b, c, d;
  a.x = d1, a.y = 0;
  b.x = 0, b.y = d1;
  c.x = n, c.y = n - d1;
  d.x = n - d1, d.y = n;
  double s = sqrt(2 * d1 * d1) * sqrt(2 * (n - d1) * (n - d1));
  while (m--) {
    point e;
    cin >> e.x >> e.y;
    double x1 = a.x - e.x, y1 = a.y - e.y;
    double x2 = b.x - e.x, y2 = b.y - e.y;
    double x3 = c.x - e.x, y3 = c.y - e.y;
    double x4 = d.x - e.x, y4 = d.y - e.y;
    swap(x3, x4);
    swap(y3, y4);
    if ((abs(vec(x1, y1, x2, y2)) + abs(vec(x2, y2, x3, y3)) +
         abs(vec(x3, y3, x4, y4)) + abs(vec(x4, y4, x1, y1))) /
                2 -
            s <
        0.00000000000000000000001)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
}
