#include <bits/stdc++.h>
using namespace std;
struct pt {
  double x, y;
};
map<int, int> mp;
int col = 0;
double area(double x1, double y1, double x2, double y2, double x3, double y3) {
  double vx1 = x2 - x1;
  double vx2 = x3 - x1;
  double vy1 = y2 - y1;
  double vy2 = y3 - y1;
  double ans = (vx1 * vy2 - vx2 * vy1) / 2;
  return ans;
}
pt a[100001];
int main() {
  double n, m;
  double k, l, s, d;
  double x1, y1, x2, y2, x3, y3, x4, y4;
  cin >> n >> d;
  x1 = 0;
  y1 = d;
  x2 = d;
  y2 = 0;
  x3 = n;
  y3 = n - d;
  x4 = n - d;
  y4 = n;
  cin >> m;
  for (int i = 1; i <= m; i++) {
    int k, nn;
    cin >> a[i].x >> a[i].y;
    bool p = false;
    if (area(a[i].x, a[i].y, x1, y1, x2, y2) * area(x3, y3, x1, y1, x2, y2) < 0)
      p = true;
    if (area(a[i].x, a[i].y, x2, y2, x3, y3) * area(x4, y4, x2, y2, x3, y3) < 0)
      p = true;
    if (area(a[i].x, a[i].y, x3, y3, x4, y4) * area(x1, y1, x3, y3, x4, y4) < 0)
      p = true;
    if (area(a[i].x, a[i].y, x4, y4, x1, y1) * area(x2, y2, x4, y4, x1, y1) < 0)
      p = true;
    if (p)
      cout << "NO" << endl;
    else
      cout << "YES" << endl;
  }
  return 0;
}
