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