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