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