#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, d, m, x, y;
  cin >> n >> d >> m;
  for (int i = 0; i < m; i++) {
    cin >> x >> y;
    if ((y >= x - d) && (y >= d - x) && (y <= x + d) && (y <= 2 * n - x - d))
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
