#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n, d;
  cin >> n >> d;
  int m;
  cin >> m;
  while (m--) {
    int x, y;
    cin >> x >> y;
    int val1 = x + y;
    int val2 = x - y;
    if (val1 >= d && val1 <= 2 * n - d && val2 >= -d && val2 <= d) {
      cout << "YES\n";
    } else {
      cout << "NO\n";
    }
  }
}
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int T = 1;
  while (T--) {
    solve();
  }
  return 0;
}
