#include <bits/stdc++.h>
using namespace std;
pair<int, int> a, b, c, d, tt;
int sq(pair<int, int> a, pair<int, int> b, pair<int, int> c) {
  a.first -= b.first;
  a.second -= b.second;
  c.first -= b.first;
  c.second -= b.second;
  return a.first * c.second - a.second * c.first;
}
bool check(pair<int, int> f) {
  return sq(a, f, b) <= 0 && sq(b, f, c) <= 0 && sq(c, f, d) <= 0 &&
         sq(d, f, a) <= 0;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie();
  cout.tie();
  int n, d1, m;
  cin >> n >> d1 >> m;
  a = {d1, 0};
  b = {0, d1};
  c = {n, n - d1};
  d = {n - d1, n};
  swap(c, d);
  for (int i = 0; i < m; i++) {
    cin >> tt.first >> tt.second;
    cout << (check(tt) ? "YES" : "NO") << endl;
  }
  return 0;
}
