#include <bits/stdc++.h>
using namespace std;
signed main() {
  int n, d;
  vector<bool> ans;
  cin >> n >> d;
  int m;
  cin >> m;
  while (m) {
    int x, y;
    cin >> x >> y;
    if (y <= d + x && y >= x - d && y <= -x + (n - d) + n && y >= -x + d)
      ans.push_back(1);
    else
      ans.push_back(0);
    m--;
  }
  for (int i = 0; i < ans.size(); i++)
    if (ans[i])
      cout << "YES"
           << "\n";
    else
      cout << "NO"
           << "\n";
}
