#include <bits/stdc++.h>
using namespace std;
template <typename a>
a SWAP(a &b, a &c) {
  a d = b;
  b = c;
  c = d;
}
long long power(long long a, long long b) {
  long long result = 1;
  while (b) {
    if (b & 1) result = a * result;
    a *= a;
    b >>= 1;
  }
  return result;
}
int main() {
  int n, d;
  while (scanf("%d %d", &n, &d) != EOF) {
    int m;
    scanf("%d", &m);
    int x, y, x1, y1, x2, y2, x3, y3, x4, y4, mainx1, mainy1, mainx2, mainy2;
    x1 = 0;
    y1 = d;
    x2 = d;
    y2 = 0;
    x3 = n;
    y3 = n - d;
    x4 = n - d;
    y4 = n;
    mainx1 = x1 - y1;
    mainy1 = x1 + y1;
    mainx2 = x3 - y3;
    mainy2 = x3 + y3;
    for (int i = 0; i < m; i++) {
      scanf("%d %d", &x, &y);
      if (!(mainx1 <= x - y && x - y <= mainy1) ||
          !(mainx2 <= x + y && x + y <= mainy2))
        printf("NO\n");
      else
        printf("YES\n");
    }
  }
  return 0;
}
