#include <bits/stdc++.h>
using namespace std;
int n, d;
bool check(int x, int y) {
  if ((x + y) >= d && (x + y) <= (2 * n - d) && (x - y) >= -d && (x - y) <= d)
    return true;
  else
    return false;
}
int main() {
  scanf("%d", &n);
  scanf("%d", &d);
  int m;
  scanf("%d", &m);
  while (m--) {
    int x, y;
    scanf("%d", &x);
    scanf("%d", &y);
    if (check(x, y))
      cout << "YES";
    else
      cout << "NO";
    printf("\n");
  }
  return 0;
}
