#include <bits/stdc++.h>
using namespace std;
const long long MAX5 = 1e+5 + 7;
const long long MAX7 = 1e+7 + 7;
const long long MAXN = MAX7;
const long long INF = 0x7f7f7f7f7f7f7f7f;
const int INFi = 0x7f7f7f7f;
const long long MOD = 1e9 + 7;
long long T = 1;
long long n, x, k, m, y, q;
string second, t, d;
long double w;
void MAIN() {
  cin >> n >> m;
  cin >> q;
  for (long long i = 0; i < q; i++) {
    cin >> x >> y;
    if (x + y < m || x + y > 2 * n - m || x - y > m || x - y < -m)
      cout << "NO\n";
    else
      cout << "YES\n";
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cout << fixed;
  cout << setprecision(12);
  ;
  mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count());
  ;
  while (T--) {
    MAIN();
  }
  return 0;
}
