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