#include <bits/stdc++.h>
using namespace std;
int d, n, m, y, x;
int main() {
  cin >> n >> d >> m;
  while (m--) {
    cin >> x >> y;
    cout << (x + y >= d && x + y <= 2 * n - d && y - x >= -d && y - x <= d
                 ? "YES\n"
                 : "NO\n");
  }
}
