#include <bits/stdc++.h>
using namespace std;
int n, d;
bool solve(void) {
  int x, y;
  cin >> x >> y;
  if (x + y < d || x + y > 2 * n - d) return 0;
  if (x - y > d || y - x > d) return 0;
  return 1;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout << fixed << setprecision(30);
  cin >> n >> d;
  int m;
  cin >> m;
  while (m--) {
    if (solve())
      cout << "YES\n";
    else
      cout << "NO\n";
  }
  return 0;
}
