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