#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using ll = long long;
using ld = long double;
using ull = unsigned long long;
using namespace std;
template <typename T>
istream &operator>>(istream &in, vector<T> &v) {
  for (auto &i : v) in >> i;
  return in;
}
template <typename T>
ostream &operator<<(ostream &out, vector<T> &v) {
  if (is_same<T, pair<int, int>>::value) {
    for (auto &i : v) out << i << '\n';
  } else {
    for (auto &i : v) out << i << " ";
  }
  return out;
}
template <typename T, typename V>
ostream &operator<<(ostream &out, pair<T, V> &v) {
  out << v.first << " " << v.second;
  return out;
}
template <typename T, typename V>
istream &operator>>(istream &in, pair<T, V> &v) {
  in >> v.first >> v.second;
  return in;
}
struct Point {
  ld x, y;
  Point(ld x = 0, ld y = 0) : x(x), y(y) {}
};
struct Vector {
  ld x, y;
  Vector(ld x = 0, ld y = 0) : x(x), y(y) {}
  Vector(const Point &a, const Point &b) {
    x = b.x - a.x;
    y = b.y - a.y;
  }
  ld len() { return sqrt(x * x + y * y); }
  ld angle() { return atan2(y, x); }
  Vector normalize(Vector &a) { return Vector(a.x / a.len(), a.y / a.len()); }
};
struct Line {
  ld a, b, c;
  Vector normal;
  Line(const Point &A = Point(), const Point &B = Point()) {
    a = B.y - A.y;
    b = -(B.x - A.x);
    c = -(a * A.x + b * A.y);
    normal = Vector(a, b);
  }
  bool is_in(const Point &A) { return a * A.x + b * A.y + c == 0; }
  Point point() {
    return Point((-a * c) / (a * a + b * b), (-b * c) / (a * a + b * b));
  }
  Point get_byX(int x) { return Point(x, (-a * x - c) / b); }
  Point get_byY(int y) { return Point((-b * y - c) / a, y); }
  ld d(Point &p) { return (a * p.x + b * p.y + c); }
};
bool is_match(const Line &a, const Line &b) {
  return (a.a * b.b == b.a * a.b && a.b * b.c == a.c * b.b &&
          a.a * b.c == a.c * b.a);
}
bool is_parallel(const Line &a, const Line &b) {
  return (a.a * b.b == b.a * a.b);
}
int product(const Vector &a, const Vector &b) { return a.x * b.x + a.y * b.y; }
int cross_product(const Vector &a, const Vector &b) {
  return a.x * b.y - a.y * b.x;
}
ld angle(Vector &a, Vector &b) {
  return atan2(cross_product(a, b), product(a, b));
}
Vector operator+(const Vector &a, const Vector &b) {
  return Vector(a.x + b.x, a.y + b.y);
}
Vector operator-(const Vector &a, const Vector &b) {
  return Vector(a.x - b.x, a.y - b.y);
}
Vector operator*(const Vector &a, const int k) {
  return Vector(a.x * k, a.y * k);
}
istream &operator>>(istream &in, Point &p) {
  in >> p.x >> p.y;
  return in;
}
ostream &operator<<(ostream &out, Point &p) {
  out << p.x << " " << p.y << '\n';
  return out;
}
ostream &operator<<(ostream &out, Vector &p) {
  out << p.x << " " << p.y << '\n';
  return out;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, d, m;
  cin >> n >> d >> m;
  vector<Point> A = {Point(d, 0), Point(0, d), Point(n - d, n),
                     Point(n, n - d)};
  Line a1(A[0], A[1]), b1(A[1], A[2]), a2(A[2], A[3]), b2(A[3], A[0]);
  while (m--) {
    Point x;
    cin >> x;
    if (a1.d(x) >= 0 && a2.d(x) >= 0 && b1.d(x) >= 0 && b2.d(x) >= 0) {
      cout << "YES" << '\n';
    } else {
      cout << "NO" << '\n';
    }
  }
}
