#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (a && b) return gcd(b, a % b);
  return a + b;
}
const long long mod = 1000000007;
const long long shitmod = 998244353;
long long binpow(long long x, long long n) {
  if (n == 0) return 1;
  if (n == 1) return x;
  if (n % 2) return x * binpow(x, n - 1);
  return binpow(x * x, n / 2);
}
string itoa(long long x) {
  string ans = "";
  while (x) {
    ans.push_back(x % 10 + '0');
    x /= 10;
  }
  if (ans == "") ans = "0";
  reverse(ans.begin(), ans.end());
  return ans;
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  long long n, d;
  cin >> n >> d;
  long long q;
  cin >> q;
  for (long long i = 0; i < q; ++i) {
    long long x, y;
    cin >> x >> y;
    if (x + y < d) {
      cout << "NO\n";
      continue;
    }
    if (x + y > n * 2 - d) {
      cout << "NO\n";
      continue;
    }
    if (y - x > d) {
      cout << "NO\n";
      continue;
    }
    if (y - x < -d) {
      cout << "NO\n";
      continue;
    }
    cout << "YES\n";
  }
  return 0;
}
int32_t main2() {
  ios_base::sync_with_stdio(0);
  long long t = -12;
  while (t--) {
    main2();
    cout << '\n';
  }
  return 0;
}
