#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using ld = long double;
using pld = pair<ld, ld>;
template <class F, class S>
istream &operator>>(istream &in, pair<F, S> &a) {
  in >> a.first >> a.second;
  return in;
}
template <class F, class S>
ostream &operator<<(ostream &out, pair<F, S> a) {
  out << a.first << " " << a.second;
  return out;
}
template <class T>
istream &operator>>(istream &in, vector<T> &a) {
  for (auto &i : a) in >> i;
  return in;
}
template <class T>
ostream &operator<<(ostream &out, vector<T> a) {
  for (auto &i : a) out << i << " ";
  return out;
}
inline void Start() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
}
signed main() {
  Start();
  int n, d;
  cin >> n >> d;
  int m;
  cin >> m;
  while (m--) {
    int x, y;
    cin >> x >> y;
    if (x + y >= d && x + y <= 2 * n - d && y + d >= x && x + d >= y)
      cout << "YES\n";
    else
      cout << "NO\n";
  }
  return 0;
}
