#include <bits/stdc++.h>
using namespace std;
long long point_line_position(long long x, long long y, long long x1,
                              long long y1, long long x2, long long y2) {
  long long d = (x - x1) * (y2 - y1) - (x2 - x1) * (y - y1);
  if (d > 0) return 1;
  if (d == 0) return 0;
  if (d < 0) return -1;
}
int main() {
  long long n, d;
  cin >> n >> d;
  long long m;
  cin >> m;
  for (long long i = 0; i < m; i++) {
    long long x, y;
    cin >> x >> y;
    bool f = 0;
    if (point_line_position(x, y, 0, d, d, 0) <= 0) {
      if (point_line_position(x, y, d, 0, n, n - d) <= 0) {
        if (point_line_position(x, y, 0, d, n - d, n) >= 0) {
          if (point_line_position(x, y, n, n - d, n - d, n) <= 0) {
            cout << "YES\n";
            f = 1;
          }
        }
      }
    }
    if (!f) cout << "NO\n";
  }
  return 0;
}
