#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, d, m;
  cin >> n >> d >> m;
  while (m--) {
    int x, y;
    cin >> x >> y;
    int a = x + y - d;
    int b = y + x - (2 * n) + d;
    int c = y - x - d;
    int e = y - x + d;
    if (a * b <= 0 && c * e <= 0) {
      cout << "YES" << endl;
    } else
      cout << "NO" << endl;
  }
}
