#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  map<pair<int, int>, bool> mp;
  pair<int, int> x1 = {0, m};
  pair<int, int> x2 = {m, 0};
  pair<int, int> y1 = {n, n - m};
  pair<int, int> y2 = {n - m, n};
  vector<pair<int, int>> rows(121);
  for (int i = 0; i <= 120; i++) {
    rows[i].first = -1;
    rows[i].second = -1;
  }
  while (1) {
    mp[x2] = 1;
    rows[x2.first].first = x2.second;
    if (x2.first == 0) break;
    x2.first--;
    x2.second++;
  }
  x2 = {m, 0};
  while (1) {
    mp[x2] = 1;
    rows[x2.first].first = x2.second;
    if (x2.first == y1.first) break;
    x2.first++;
    x2.second++;
  }
  x2 = {m, 0};
  while (1) {
    mp[y1] = 1;
    rows[y1.first].second = y1.second;
    if (y1.first == y2.first) break;
    y1.first--;
    y1.second++;
  }
  y1 = {n, n - m};
  while (1) {
    mp[y2] = 1;
    rows[y2.first].second = y2.second;
    if (y2.first == 0) break;
    y2.first--;
    y2.second--;
  }
  x1 = {0, m};
  x2 = {m, 0};
  y1 = {n, n - m};
  y2 = {n - m, n};
  for (int i = 0; i <= 120; i++) {
    if (rows[i].first == -1) continue;
    for (int j = rows[i].first; j <= rows[i].second; j++) {
      mp[{i, j}] = 1;
    }
  }
  int q;
  cin >> q;
  while (q--) {
    int x, y;
    cin >> x >> y;
    if (mp[{x, y}] == 1)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
