#include <bits/stdc++.h>
struct Point {
  float x;
  float y;
  Point(float x, float y) {
    this->x = x;
    this->y = y;
  }
};
float GetCross(Point& p1, Point& p2, Point& p) {
  return (p2.x - p1.x) * (p.y - p1.y) - (p.x - p1.x) * (p2.y - p1.y);
}
float n, d;
bool IsPointInMatrix(Point& p) {
  Point p1(0, d);
  Point p2(d, 0);
  Point p3(n, n - d);
  Point p4(n - d, n);
  return GetCross(p1, p2, p) * GetCross(p3, p4, p) >= 0 &&
         GetCross(p2, p3, p) * GetCross(p4, p1, p) >= 0;
}
using namespace std;
int main() {
  cin >> n >> d;
  int q;
  cin >> q;
  while (q--) {
    Point testPoint(0, 0);
    cin >> testPoint.x >> testPoint.y;
    if (IsPointInMatrix(testPoint))
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
