#include <bits/stdc++.h>
using namespace std;
struct coords {
  int x, y;
} c[6];
int n, d;
int m;
int main() {
  cin >> n >> d;
  cin >> m;
  int x, y;
  c[1].x = 0;
  c[1].y = d;
  c[2].x = d;
  c[2].y = 0;
  c[3].x = n;
  c[3].y = n - d;
  c[4].x = n - d;
  c[4].y = n;
  c[5].x = 0;
  c[5].y = d;
  for (int i = 1; i <= m; i++) {
    cin >> x >> y;
    double test;
    bool ok = true;
    for (int i = 1; i <= 4; i++) {
      test = (c[i].x - c[i + 1].x) * (c[i].y - y) -
             (c[i].y - c[i + 1].y) * (c[i].x - x);
      test /= 2;
      if (test < 0) ok = false;
    }
    if (ok)
      cout << "YES"
           << "\n";
    else
      cout << "NO"
           << "\n";
  }
  return 0;
}
