#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const long long inf = 922337203685477;
const long long mininf = -922337203685477;
const long long nax = 0;
long long n, d, m, x, y;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> n >> d;
  cin >> m;
  while (m--) {
    cin >> x >> y;
    long long cek = 1;
    if (x + y < d || x + y > 2 * n - d) {
      cek = 0;
    }
    if (x - y > d || x - y < -d) {
      cek = 0;
    }
    if (cek) {
      cout << "YES" << '\n';
    } else {
      cout << "NO" << '\n';
    }
  }
}
