#include <bits/stdc++.h>
using namespace std;
int N, D;
int ymin(int x) { return abs(x - D); }
int ymax(int x) {
  int f = fabs(x + D - N);
  return N - f;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> N >> D;
  int qt, x, y;
  cin >> qt;
  while (qt--) {
    cin >> x >> y;
    if (ymin(x) <= y && y <= ymax(x))
      cout << "YES\n";
    else
      cout << "NO\n";
  }
  return 0;
}
