#include <bits/stdc++.h>
using namespace std;
string s[110];
int n, d;
int m;
int main() {
  cin >> n >> d;
  cin >> m;
  for (int i = 0; i < m; ++i) {
    int x, y;
    cin >> x >> y;
    bool t = false;
    if (!((x - y) <= d && (x - y) >= -d)) t = true;
    if (!((x + y) <= n + n - d && (x + y) >= d)) t = true;
    if (t == true)
      s[i] = "NO";
    else
      s[i] = "YES";
  }
  for (int i = 0; i < m; i++) cout << s[i] << endl;
  return 0;
}
