#include <bits/stdc++.h>
using namespace std;
int area(int x1, int y1, int x2, int y2, int x3, int y3) {
  return abs((x1 * (y2 - y3) + x2 * (y3 - y1) + x3 * (y1 - y2)));
}
bool check(int xp, int yp, int x1, int y1, int x2, int y2, int x3, int y3) {
  int area1 = area(x1, y1, x2, y2, x3, y3);
  int area2 = area(xp, yp, x2, y2, x3, y3);
  int area3 = area(x1, y1, xp, yp, x3, y3);
  int area4 = area(x1, y1, x2, y2, xp, yp);
  if (area1 == area2 + area3 + area4)
    return 1;
  else
    return false;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t = 1;
  while (t-- > 0) {
    int n, d;
    cin >> n >> d;
    vector<pair<int, int>> vp1 = {{0, 0}, {d, 0}, {0, d}};
    vector<pair<int, int>> vp2 = {{n, n}, {n - d, n}, {n, n - d}};
    vector<pair<int, int>> vp3 = {{n, 0}, {n, n - d}, {d, 0}};
    vector<pair<int, int>> vp4 = {{0, n}, {n - d, n}, {0, d}};
    int m;
    cin >> m;
    for (int i = 0; i < m; i++) {
      int x, y;
      cin >> x >> y;
      bool b1 = check(x, y, vp1[0].first, vp1[0].second, vp1[1].first,
                      vp1[1].second, vp1[2].first, vp1[2].second);
      bool b2 = check(x, y, vp2[0].first, vp2[0].second, vp2[1].first,
                      vp2[1].second, vp2[2].first, vp2[2].second);
      bool b3 = check(x, y, vp3[0].first, vp3[0].second, vp3[1].first,
                      vp3[1].second, vp3[2].first, vp3[2].second);
      bool b4 = check(x, y, vp4[0].first, vp4[0].second, vp4[1].first,
                      vp4[1].second, vp4[2].first, vp4[2].second);
      if (b1 || b2 || b3 || b4) {
        bool c1 = (area(0, d, d, 0, x, y) == 0);
        bool c2 = (area(d, 0, n, n - d, x, y) == 0);
        bool c3 = (area(n, n - d, n - d, n, x, y) == 0);
        bool c4 = (area(0, d, n - d, n, x, y) == 0);
        if (c1 || c2 || c3 || c4)
          cout << "YES" << endl;
        else
          cout << "NO" << endl;
      } else
        cout << "YES" << endl;
    }
  }
}
