#include <bits/stdc++.h>
using namespace std;
const long double eps = 1e-6;
struct Point {
  long double x, y;
  void scan() { cin >> x >> y; }
  void print() { cout << x << " " << y << "\n"; }
};
long double operator*(Point a, Point b) { return a.x * b.x + a.y * b.y; }
long double operator%(Point a, Point b) { return a.x * b.y - a.y * b.x; }
Point operator-(Point a, Point b) { return Point{a.x - b.x, a.y - b.y}; }
Point operator+(Point a, Point b) { return Point{a.x + b.x, a.y + b.y}; }
Point operator*(Point a, long double k) { return Point{a.x * k, a.y * k}; }
Point operator/(Point a, long double k) { return Point{a.x / k, a.y / k}; }
long double len(Point a) { return sqrt(a.x * a.x + a.y * a.y); }
int main() {
  long double n, d;
  cin >> n >> d;
  vector<Point> v(4);
  v[0] = Point{0, d};
  v[1] = Point{d, 0};
  v[2] = Point{n, n - d};
  v[3] = Point{n - d, n};
  int m;
  cin >> m;
  for (int j = 0; j < m; ++j) {
    Point c;
    c.scan();
    long double f = 0;
    for (int i = 0; i < 4; ++i) {
      Point a = v[i % 4], b = v[(i + 1) % 4];
      a = a - c;
      b = b - c;
      f += atan2(a % b, a * b);
    }
    if (abs(f) < eps) {
      cout << "NO\n";
    } else {
      cout << "YES\n";
    }
  }
  return 0;
}
