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