#include <bits/stdc++.h>
using namespace std;
long long gcdExtended(long long a, long long b, long long *x, long long *y) {
  if (a == 0) {
    *x = 0;
    *y = 1;
    return b;
  }
  long long x1, y1;
  long long gcd = gcdExtended(b % a, a, &x1, &y1);
  *x = y1 - (b / a) * x1;
  *y = x1;
  return gcd;
}
void diophantine(long long a, long long b, long long c, long long *c1,
                 long long *c2) {
  long long x, y;
  long long d = gcdExtended(a, b, &x, &y);
  c = c / d;
  *c1 = x * c;
  *c2 = y * c;
}
int main(void) {
  double n, d;
  cin >> n >> d;
  long long m;
  cin >> m;
  for (int i = 0; i < m; i++) {
    double x, y;
    cin >> x >> y;
    double xp, yp;
    xp = (x - y + d) / sqrt(2);
    yp = (x + y - d) / sqrt(2);
    if (xp < 0 || yp < 0 || xp > d * sqrt(2) || yp > sqrt(2) * (n - d))
      cout << "NO" << endl;
    else
      cout << "YES" << endl;
  }
}
