#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n, d;
  cin >> n >> d;
  int m;
  cin >> m;
  int x;
  int y;
  string p[m];
  for (int i = 0; i < m; i++) {
    cin >> x >> y;
    int lol1, lol2, lol3;
    lol1 = lol2 = lol3 = 0;
    if (x + y >= d) lol1 = 1;
    if (x + y <= 2 * n - d) lol2 = 1;
    if (abs(x - y) <= d) {
      lol3 = 1;
    }
    if (lol1 * lol2 * lol3 == 1) {
      p[i] = "YES";
    } else {
      p[i] = "NO";
    }
  }
  for (int i = 0; i < m; i++) {
    cout << p[i] << endl;
  }
  return 0;
}
