#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline T maxi(T a, T b) {
  return a > b ? a : b;
}
template <typename T>
inline T mini(T a, T b) {
  return a < b ? a : b;
}
template <typename T>
inline T absl(T a) {
  return a > 0 ? a : -a;
}
template <typename T>
inline T gcd(T a, T b) {
  T t;
  if (a < b) {
    while (a) {
      t = a;
      a = b % a;
      b = t;
    }
    return b;
  } else {
    while (b) {
      t = b;
      b = a % b;
      a = t;
    }
    return a;
  }
}
void solve() {}
void input() {
  int n, d;
  cin >> n >> d;
  int m;
  cin >> m;
  while (m--) {
    int x, y;
    cin >> x >> y;
    if (x + y - d >= 0 && x + y - 2 * n + d <= 0 && x - y + d >= 0 &&
        x - y - d <= 0) {
      cout << "YES" << endl;
    } else {
      cout << "NO" << endl;
    }
  }
}
int main() {
  input();
  return 0;
}
