#include <bits/stdc++.h>
using namespace std;
int n, d, m, x[4], y[4], line[3], l, r;
float tra_area;
float calc_traingle(int x1, int y1, int x2, int y2) {
  return abs((l * (y1 - y2) + x1 * (y2 - r) + x2 * (r - y1)) / 2.0);
}
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  ;
  cin >> n >> d >> m;
  x[0] = 0, x[1] = d, x[2] = n, x[3] = n - d;
  y[0] = d, y[1] = 0, y[2] = n - d, y[3] = n;
  l = x[0], r = y[0];
  tra_area = calc_traingle(x[1], y[1], x[2], y[2]) * 2;
  while (m--) {
    cin >> l >> r;
    float a = calc_traingle(x[0], y[0], x[1], y[1]);
    float b = calc_traingle(x[0], y[0], x[3], y[3]);
    float c = calc_traingle(x[3], y[3], x[2], y[2]);
    float d = calc_traingle(x[2], y[2], x[1], y[1]);
    if (a + b + c + d == tra_area)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
