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