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