#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n = 0, d = 0, m = 0, x = 0, y = 0;
  cin >> n >> d >> m;
  for (int i = 0; i < m; i++) {
    cin >> x >> y;
    if (x - y <= d && y - x <= d && x + y <= n + n - d && x + y >= d) {
      cout << "YES\n";
    } else {
      cout << "NO\n";
    }
  }
}
