#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e18;
const double EPS = 1e-11;
const double PI = atan2(0, -1);
long long pr(int x, int y, int x1, int y1, int x2, int y2) {
  return (x2 - x1) * (y - y1) - (y2 - y1) * (x - x1);
}
int main() {
  long long n, d, m, x, y;
  cin >> n >> d;
  long long x1 = 0, y1 = d;
  long long x2 = n - d, y2 = n;
  long long x3 = n, y3 = n - d;
  long long x4 = d, y4 = 0;
  cin >> m;
  for (int i = 0; i < m; i++) {
    cin >> x >> y;
    bool f = 0;
    long long d1 = pr(x, y, x1, y1, x2, y2);
    long long d2 = pr(x, y, x2, y2, x3, y3);
    long long d3 = pr(x, y, x3, y3, x4, y4);
    long long d4 = pr(x, y, x4, y4, x1, y1);
    if ((d1 <= 0 && d2 <= 0 && d3 <= 0 && d4 <= 0) ||
        (d1 >= 0 && d2 >= 0 && d3 >= 0 && d4 >= 0)) {
      cout << "YES" << endl;
    } else {
      cout << "NO" << endl;
    }
  }
  return 0;
}
