#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, d, m, x, y, i, j;
  cin >> n >> d >> m;
  while (m--) {
    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";
  }
}
