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