#include <bits/stdc++.h>
using namespace std;
int main() {
  long long k, d;
  cin >> k >> d;
  long long n;
  cin >> n;
  long long a, b;
  for (int i = 1; i <= n; ++i) {
    cin >> a >> b;
    if (abs(a - b) > d) {
      cout << "NO" << endl;
      continue;
    }
    if (a + b < d) {
      cout << "NO" << endl;
      continue;
    }
    if (a + b > 2 * k - d) {
      cout << "NO" << endl;
      continue;
    }
    cout << "YES" << endl;
  }
  return 0;
}
