#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 5;
const int mod = 1e9 + 7;
void solve() {
  int n, d, m;
  cin >> n >> d >> m;
  while (m--) {
    int x, y;
    cin >> x >> y;
    bool a = ((x + y - d) >= 0);
    bool b = ((x + y - (2 * n) + d) <= 0);
    bool c = ((x - y - d) <= 0);
    bool e = ((x - y + d) >= 0);
    bool f = (((a & b) & c) & e);
    if (f)
      printf("YES\n");
    else
      printf("NO\n");
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t = 1;
  while (t--) solve();
  return 0;
}
