#include <bits/stdc++.h>
typedef struct grassp {
  int x;
  int y;
} grasshopers;
int main() {
  int d, n, gn, i;
  int x1, x2, x3, x4, y1, y2, y3, y4;
  scanf("%d %d", &n, &d);
  if (d >= 1 && d < n && n <= 100) {
    scanf("%d", &gn);
    grasshopers grasshopers_co[gn];
    for (i = 0; i < gn; i++) {
      scanf("%d %d", &grasshopers_co[i].x, &grasshopers_co[i].y);
    }
    for (i = 0; i < gn; i++) {
      if ((grasshopers_co[i].x + grasshopers_co[i].y >= d) &&
          (grasshopers_co[i].x + grasshopers_co[i].y <= 2 * n - d) &&
          (grasshopers_co[i].y - grasshopers_co[i].x >= -d) &&
          (grasshopers_co[i].y - grasshopers_co[i].x <= d)) {
        printf("YES");
        printf("\n");
      } else {
        printf("NO");
        printf("\n");
      }
    }
  }
  return 0;
}
