#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, d;
  cin >> n >> d;
  int t;
  cin >> t;
  while (t--) {
    int a, b;
    cin >> a >> b;
    int k1 = a + b;
    int k2 = abs(a - b);
    if (k1 <= (2 * n - d) && k1 >= d && k2 <= d)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
}
