#include <bits/stdc++.h>
using namespace std;
double lineInX(int x1, int y1, int x2, int y2, int x) {
  return (double)(x - x1) * (y2 - y1) / (x2 - x1) + y1;
}
int main() {
  int n, d;
  cin >> n >> d;
  pair<int, int> left(0, d);
  pair<int, int> lower(d, 0);
  pair<int, int> right(n, n - d);
  pair<int, int> upper(n - d, n);
  int k;
  cin >> k;
  while (k--) {
    int x, y;
    cin >> x >> y;
    if ((y >= lineInX(left.first, left.second, lower.first, lower.second, x)) &&
        (y <=
         lineInX(upper.first, upper.second, right.first, right.second, x)) &&
        (y >=
         lineInX(lower.first, lower.second, right.first, right.second, x)) &&
        (y <= lineInX(left.first, left.second, upper.first, upper.second, x))) {
      cout << "YES" << endl;
    } else {
      cout << "NO" << endl;
    }
  }
  return 0;
}
