#include <bits/stdc++.h>
using namespace std;
bool isNonDegenerateTriangle(int a, int b, int c) {
  return (a + b > c && b + c > a && c + a > b);
}
bool isDegenerateTriangle(int a, int b, int c) {
  return (a + b == c || b + c == a || c + a == b);
}
int main() {
  int n, d, m;
  cin >> n >> d >> m;
  while (m--) {
    int a, b;
    cin >> a >> b;
    if (a + b >= d && a + b <= 2 * n - d && a - b >= -d && a - b <= d)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
}
