#include <bits/stdc++.h>
using namespace std;
const long long N = 1e5;
const long long INF = 1e18;
const long double pi = 2 * acos(0.0);
inline void solve() {
  long long n, d, m;
  cin >> n >> d >> m;
  for (int i = 0; i < m; i++) {
    long long first, second;
    cin >> first >> second;
    if (first + second >= d && first + second <= 2 * n - d &&
        second - first <= d && second - first >= -d)
      cout << "YES";
    else
      cout << "NO";
    cout << endl;
  }
  cout << endl;
}
inline void stop();
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  solve();
  stop();
  return 0;
}
inline void stop() { exit(0); }
