#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  long long n, d;
  cin >> n >> d;
  long long m;
  cin >> m;
  while (m--) {
    long long x, y;
    cin >> x >> y;
    if (!((x - y) <= d && (x - y) >= -d) ||
        !((x + y) <= n + n - d && (x + y) >= d))
      cout << "NO" << endl;
    else
      cout << "YES" << endl;
  }
  return 0;
}
