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