#include <bits/stdc++.h>
using namespace std;
bool ans(int arr[], int m, int n) {
  if (m == 0) return false;
  if (arr[0] == 1 || arr[m - 1] == n) return true;
  int c = 1;
  for (int i = 1; i < m; i++) {
    if (arr[i] == arr[i - 1] + 1)
      c++;
    else
      c = 1;
    if (c == 3) {
      return true;
    }
  }
  return false;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, d;
  cin >> n >> d;
  int q;
  cin >> q;
  for (int i = 0; i < q; i++) {
    int x, y;
    cin >> x >> y;
    bool a1 = false, b1 = false, c1 = false, d1 = false;
    if (x + y - d >= 0) a1 = true;
    if (y - x - d <= 0) b1 = true;
    if (y - x + d >= 0) c1 = true;
    if (y + x + d - 2 * n <= 0) d1 = true;
    if (a1 && b1 && c1 && d1)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
}
