#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, d, x1, x2, x3, x4, y1, y2, y3, y4;
  long long A, B, C, D, E, F, G, H, I, J, K, L;
  cin >> n >> d;
  x1 = 0, y1 = d;
  x2 = n - d, y2 = n;
  x3 = n, y3 = n - d;
  x4 = d, y4 = 0;
  A = -1 * (y2 - y1);
  B = x2 - x1;
  C = -1 * (A * x1 + B * y1);
  D = -1 * (y3 - y2);
  E = x3 - x2;
  F = -1 * (D * x2 + E * y2);
  G = -1 * (y4 - y3);
  H = x4 - x3;
  I = -1 * (G * x3 + H * y3);
  J = -1 * (y1 - y4);
  K = x1 - x4;
  L = -1 * (J * x4 + K * y4);
  int q;
  cin >> q;
  while (q--) {
    long long x, y;
    cin >> x >> y;
    long long a = A * x + B * y + C;
    long long b = D * x + E * y + F;
    long long c = G * x + H * y + I;
    long long d = J * x + K * y + L;
    if (a > 0 || b > 0 || d > 0 || c > 0)
      cout << "NO" << endl;
    else
      cout << "YES" << endl;
  }
  return 0;
}
