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