#include <bits/stdc++.h>
using namespace std;
long long fp(long long n, long long p) {
  if (p == 0) return 1;
  if (p == 1) return n;
  long long res;
  res = fp(n, p / 2);
  res = (res * res);
  if (p % 2) res = (res * n);
  return res;
}
int main() {
  ios::sync_with_stdio(0);
  ios_base::sync_with_stdio(0);
  cin.tie(0), cout.tie(0);
  int n, m, a, b;
  cin >> n >> m >> a;
  while (a--) {
    int x, y;
    cin >> x >> y;
    if (x + y >= m && x + y <= (2 * n - m) && y <= x + m && y >= x - m)
      cout << "YES" << '\n';
    else
      cout << "NO" << '\n';
  }
  return 0;
}
