#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
const long long int MXN = 1e18;
struct node {
  double x, y;
} p, p1, p2, p3, p4;
double ji(node a, node b, node c) {
  return (b.x - a.x) * (c.y - a.y) - (c.x - a.x) * (b.y - a.y);
}
bool jug(node a) {
  if ((ji(p1, p2, a) * ji(p3, p4, a) >= 0) &&
      (ji(p2, p3, a) * ji(p4, p1, a) >= 0))
    return true;
  return false;
}
int main() {
  int n, d, m;
  cin >> n >> d >> m;
  p1.x = 0, p1.y = d;
  p2.x = d, p2.y = 0;
  p3.x = n, p3.y = n - d;
  p4.x = n - d, p4.y = n;
  int ans = 0;
  double a, b;
  for (int i = 0; i < m; i++) {
    cin >> p.x >> p.y;
    if (jug(p)) {
      cout << "YES" << endl;
    } else
      cout << "NO" << endl;
  }
}
