#include <bits/stdc++.h>
using namespace std;
const long long N = 1e6 + 9;
const long long M = 1e2 + 9;
const long long INFINT = 1e9 + 9;
const long long INFLL = 1e18 + 9;
const long double EPS = 1e-12;
struct point {
  long long first, second;
  point(long long xx, long long yy) {
    first = xx;
    second = yy;
  }
  void rebuild() {
    long long p = first + second;
    long long q = first - second;
    first = p;
    second = q;
  }
};
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long n, p, q;
  cin >> n >> p >> q;
  point a(0, p);
  point b(p, 0);
  point c(n, n - p);
  point d(n - p, n);
  a.rebuild();
  b.rebuild();
  c.rebuild();
  d.rebuild();
  for (long long i = 0; i < q; i++) {
    long long first, second;
    cin >> first >> second;
    point t(first, second);
    t.rebuild();
    if (t.second > b.second || t.second < a.second || t.first > c.first ||
        t.first < a.first)
      cout << "NO\n";
    else
      cout << "YES\n";
  }
  return 0;
}
