#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, d, m, x, y;
  bool a[10000];
  cin >> n >> d >> m;
  for (int i = 0; i < m; i++) {
    cin >> x >> y;
    if (((x - y) <= d && (x - y) >= -d) &&
        ((x + y) <= n + n - d && (x + y) >= d))
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
