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