#include <bits/stdc++.h>
using namespace std;
namespace std {
template <>
struct hash<pair<int, int>> {
  inline size_t operator()(const pair<int, int> &v) const {
    hash<int> int_hasher;
    return int_hasher(v.first) ^ int_hasher(v.second);
  }
};
};  // namespace std
template <class T>
using pqg = priority_queue<T, vector<T>, greater<T>>;
template <typename T>
void print(T t) {
  cout << t << endl;
}
template <typename T, typename... Args>
void print(T t, Args... args) {
  cout << t << " ";
  print(args...);
}
int check(pair<float, float> p, pair<float, float> p1, pair<float, float> p2) {
  float d;
  d = (p.first - p1.first) * (p2.second - p1.second) -
      (p.second - p1.second) * (p2.first - p1.first);
  if (d > 0)
    return 1;
  else if (d < 0)
    return 0;
  return -1;
}
bool online(pair<float, float> p, pair<float, float> p1,
            pair<float, float> p2) {
  int t1 = 0, t2 = 0;
  if (check(p, p1, p2) != -1) return 0;
  if (p1.first < p2.first) {
    if (p1.first <= p.first && p.first <= p2.first) t1 = 1;
  } else {
    if (p2.first <= p.first && p.first <= p1.first) t1 = 1;
  }
  if (p1.second < p2.second) {
    if (p1.second <= p.second && p.second <= p2.second) t2 = 1;
  } else {
    if (p2.second <= p.second && p.second <= p1.second) t2 = 1;
  }
  if (t1 == 1 && t2 == 1) return 1;
  return 0;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  float n, d;
  cin >> n >> d;
  pair<float, float> p1, p2, p3, p4;
  p1.first = 0;
  p1.second = d;
  p2.first = d;
  p2.second = 0;
  p3.first = n;
  p3.second = n - d;
  p4.first = n - d;
  p4.second = n;
  int t;
  cin >> t;
  while (t > 0) {
    pair<float, float> p;
    cin >> p.first >> p.second;
    if (online(p, p1, p2) || online(p, p2, p3) || online(p, p3, p4) ||
        online(p, p1, p4))
      cout << "YES" << endl;
    else {
      if (check(p, p1, p2) ^ check(p, p4, p3) &&
          check(p, p2, p3) ^ check(p, p1, p4)) {
        if (check(p3, p1, p2) == check(p, p1, p2) &&
            check(p1, p2, p3) == check(p, p2, p3))
          cout << "YES" << endl;
        else
          cout << "NO" << endl;
      } else
        cout << "NO" << endl;
    }
    t--;
  }
  return 0;
}
