#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int n, d, m;
  cin >> n >> d >> m;
  long long int x, y;
  while (m-- > 0) {
    cin >> x >> y;
    bool f = true;
    if (!((x - y) <= d && (x - y) >= -d)) {
      f = false;
    }
    if (!((x + y) >= d && (x + y) <= (n + n - d))) {
      f = false;
    }
    f ? cout << "YES" : cout << "NO";
    cout << endl;
  }
  return 0;
}
