#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  int m;
  cin >> m;
  int h, j;
  for (int i = 0; i < m; i++) {
    cin >> h >> j;
    if (j <= h + k && j >= h - k && h >= k - j && h <= 2 * n - j - k) {
      cout << "YES" << endl;
    } else {
      cout << "NO" << endl;
    }
  }
  return 0;
}
