#include <bits/stdc++.h>
using namespace std;
struct node {
  int x, y;
} pp[10009];
int main() {
  int n, d;
  scanf("%d%d", &n, &d);
  int m;
  scanf("%d", &m);
  for (int i = 1; i <= m; ++i) {
    scanf("%d%d", &pp[i].x, &pp[i].y);
    if (pp[i].x >= 0 && pp[i].y >= 0 && d >= pp[i].x - pp[i].y &&
        2 * n - d >= pp[i].x + pp[i].y && d <= pp[i].x + pp[i].y &&
        -d <= pp[i].x - pp[i].y) {
      printf("YES\n");
    } else {
      printf("NO\n");
    }
  }
  return 0;
}
