#include <bits/stdc++.h>
int n, d, m;
int main() {
  scanf("%d%d%d", &n, &d, &m);
  for (int i = 0; i < m; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    if (x + y < d || x + y > 2 * n - d || x - y > d || x - y < -d)
      puts("NO");
    else
      puts("YES");
  }
  return 0;
}
