#include <bits/stdc++.h>
int main(int argc, char const *argv[]) {
  int n, d, m;
  scanf("%d%d", &n, &d);
  printf("\n");
  scanf("%d", &m);
  while (m > 0) {
    int x, y;
    scanf("%d%d", &x, &y);
    int s = x + y - d;
    int q = x + y - 2 * n + d;
    int r = x - y + d;
    int t = x - y - d;
    if (s >= 0 && q <= 0 && r >= 0 && t <= 0) {
      printf("yes\n");
    } else {
      printf("no\n");
    }
    m--;
  }
  return 0;
}
