#include <bits/stdc++.h>
using namespace std;
int n, d, m, X, Y;
string a[200];
bool _1(int x, int y) {
  if (y <= x + d) return 1;
  return 0;
}
bool _2(int x, int y) {
  if (y >= x - d) return 1;
  return 0;
}
bool _3(int x, int y) {
  if (y >= d - x) return 1;
  return 0;
}
bool _4(int x, int y) {
  if (y <= 2 * n - d - x) return 1;
  return 0;
}
int main() {
  cin >> n >> d >> m;
  for (int i = 0; i < m; i++) {
    cin >> X >> Y;
    if (_1(X, Y) && _2(X, Y) && _3(X, Y) && _4(X, Y))
      a[i] = "YES";
    else
      a[i] = "NO";
  }
  for (int i = 0; i < m; i++) cout << a[i] << endl;
  return 0;
}
