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