#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e9 + 1;
const int INF_INT = 1e9 + 100;
const long long POLTOS = 50;
const long long SOTKA = 100;
const long long P = 1e9 + 7;
const long double eps = 1e-9;
const long long base = 1000 * 1000 * 1000;
const long long M = 1050;
const long long MAXN = 1e6 + 1;
const long long MAXN1 = 2 * 1e2;
const long long N = 20;
const long double pi = acos(-1);
const long long mod = 1e9 + 7;
const int S_M = 20;
const long long LEN = 96;
using namespace std;
struct point {
  float first, second;
  point(float x_, float y_) {
    first = x_;
    second = y_;
  }
  point() {
    first = 0;
    second = 0;
  }
};
struct vect {
  float first, second;
  vect(point a, point b) {
    first = b.first - a.first;
    second = b.second - a.second;
  }
};
float dot_product(vect v1, vect v2) {
  return v1.first * v2.first + v1.second * v2.second;
}
float cross_product(vect v1, vect v2) {
  return v1.first * v2.second - v1.second * v2.first;
}
int main() {
  int n;
  int k, d;
  cin >> k >> d;
  cin >> n;
  vector<point> a(n + 1);
  a[0].first = 0;
  a[0].second = d;
  a[1].first = d;
  a[1].second = 0;
  a[2].first = k;
  a[2].second = k - d;
  a[3].first = k - d;
  a[3].second = k;
  a[4] = a[0];
  int test[4];
  for (int i = 0; i < n; i++) {
    point p;
    cin >> p.first >> p.second;
    for (int j = 0; j < 4; j++) {
      point p1 = a[j];
      point p2 = a[j + 1];
      vect v(p1, p);
      vect v2(p1, p2);
      test[j] = cross_product(v, v2);
    }
    if (test[0] == 0 || test[1] == 0 || test[2] == 0 || test[3] == 0)
      cout << "YES" << endl;
    else if (test[0] < 0 && test[1] < 0 && test[2] < 0 && test[3] < 0)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
