#include <bits/stdc++.h>
bool f1_check(int x, int y, int d) {
  int f = x + d;
  return y <= f;
}
bool f2_check(int x, int y, int n, int d) {
  int f = -x + 2 * n - d;
  return y <= f;
}
bool f3_check(int x, int y, int d) {
  int f = x - d;
  return y >= f;
}
bool f4_check(int x, int y, int d) {
  int f = d - x;
  return y >= f;
}
bool check(int x, int y, int n, int d) {
  return f1_check(x, y, d) && f2_check(x, y, n, d) && f3_check(x, y, d) &&
         f4_check(x, y, d);
}
int main() {
  int n, d, m, x, y;
  std::cin >> n >> d >> m;
  bool answers[100];
  for (int i = 0; i < m; i++) {
    std::cin >> x >> y;
    answers[i] = check(x, y, n, d);
  }
  for (int i = 0; i < m; i++) {
    std::cout << (answers[i] ? "YES" : "NO") << std::endl;
  }
  return 0;
}
