#include <bits/stdc++.h>
using namespace std;
const int N = 3e4 + 1e3;
const int M = 5e5 + 5;
const int sz = 1399;
int x[10];
int y[10];
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, d;
  cin >> n >> d;
  x[0] = 0;
  y[0] = d;
  x[1] = d;
  y[1] = 0;
  x[2] = n;
  y[2] = n - d;
  x[3] = n - d;
  y[3] = n;
  x[4] = x[0];
  y[4] = y[0];
  int m;
  cin >> m;
  long long A = (n - d);
  long long B = d;
  long long second = 2 * A * B;
  while (m--) {
    int a, b;
    cin >> a >> b;
    long long s = 0;
    for (int i = 0; i < 4; i++) {
      long long z = 0;
      z = abs((x[i + 1] - a) * (y[i] - b) - (y[i + 1] - b) * (x[i] - a));
      s += z;
    }
    s /= 2;
    if (second == s) {
      cout << "YES" << '\n';
      ;
    } else {
      cout << "NO" << '\n';
    }
  }
}
