#include <bits/stdc++.h>
using namespace std;
int proverka(int Px, int Py, int Ax, int Ay, int Bx, int By) {
  return (Bx - Ax) * (Py - Ay) - (By - Ay) * (Px - Ax);
}
int main() {
  int p1, p2, p3, p4;
  int n, d;
  int x, y;
  int m;
  cin >> n >> d >> m;
  for (int i = 0; i < m; i++) {
    cin >> x >> y;
    p1 = proverka(x, y, 0, d, n - d, n);
    p2 = proverka(x, y, n - d, n, n, n - d);
    p3 = proverka(x, y, n, n - d, d, 0);
    p4 = proverka(x, y, d, 0, 0, d);
    if ((p1 <= 0 && p2 <= 0 && p3 <= 0 && p4 <= 0) ||
        (p1 >= 0 && p2 >= 0 && p3 >= 0 && p4 >= 0))
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
