#include <bits/stdc++.h>
using namespace std;
void a() {
  int n;
  std::cin >> n;
  for (int i = 0; i < n; i++) {
    bool tmp;
    std::cin >> tmp;
    if (tmp) {
      std::cout << "HARD\n";
      return;
    }
  }
  std::cout << "EASY\n";
}
int checkB(int xl, int yl, int xd, int yd) {
  if (xd - xl == yd - yl) return 0;
  if (xd - xl > yd - yl) return -1;
  return 1;
}
int checkB2(int xl, int yl, int xd, int yd) {
  if (yd + xd == xl + yl) return 0;
  if (yd + xd < yl + xl) return -1;
  return 1;
}
void b() {
  int n, d;
  cin >> n >> d;
  int N;
  cin >> N;
  for (int i = 0; i < N; i++) {
    int tx, ty;
    cin >> tx >> ty;
    if (checkB(d, 0, tx, ty) >= 0 && checkB(0, d, tx, ty) <= 0 &&
        checkB2(d, 0, tx, ty) >= 0 && checkB2(n, n - d, tx, ty) <= 0)
      cout << "YES\n";
    else
      cout << "NO\n";
  }
}
bool checkC(vector<int> &sum, vector<int> &values, int sumVal) {
  int cPos = 0;
  int tSum = 0;
  while (cPos != values.size()) {
    tSum += values[cPos];
    cPos++;
    if (tSum == sumVal)
      tSum = 0;
    else if (tSum > sumVal)
      return false;
  }
  return tSum == 0 || tSum == sumVal;
}
void c() {
  int n;
  string num;
  cin >> n;
  cin >> num;
  vector<int> sum((unsigned)abs(n));
  vector<int> values((unsigned)abs(n));
  for (int i = 0; i < n; i++) values[i] = num[i] - '0';
  sum[0] = values[0];
  for (int i = 1; i < n; i++) sum[i] = sum[i - 1] + values[i];
  int up = sum[n - 1] / 2;
  for (int i = 0; i < up; i++)
    if (checkC(sum, values, i)) {
      cout << "YES\n";
      return;
    }
  cout << "NO\n";
}
int main() {
  b();
  return 0;
}
