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