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