#include <bits/stdc++.h>
using namespace std;
std::string IntToStr(int x) {
  std::string str;
  while (x != 0) {
    str += x % 10 + '0';
    x = x / 10;
  }
  std::reverse(str.begin(), str.end());
  return str;
}
int StrToInt(std::string str) {
  int rez = 0;
  std::string str2 = str;
  if (!str.empty()) {
    if (str[0] == '-') str2 = str.substr(1);
    for (int i = 0; i < str2.size(); i++) {
      if (str2[i] >= '0' && str2[i] <= '9')
        rez = rez * 10 + str2[i] - '0';
      else
        return -1;
    }
    if (str[0] == '-') rez *= -1;
  }
  return rez;
}
std::string ToLower(std::string str) {
  for (int i = 0; i < str.size(); i++) {
    if (str[i] >= 'A' && str[i] <= 'Z') str[i] = str[i] - 'A' + 'a';
  }
  return str;
}
std::vector<std::string> Split(std::string str, char parser = ' ') {
  std::vector<std::string> rez;
  while (str.find(parser) != -1) {
    int p = str.find(parser);
    rez.push_back(str.substr(0, p));
    str = str.substr(p + 1);
  }
  rez.push_back(str);
  return rez;
}
int MaxInVec(std::vector<int> v) {
  int rez = v[0];
  for (int i = 0; i < v.size(); i++)
    if (v[i] > rez) rez = v[i];
  return rez;
}
int MinInVec(std::vector<int> v) {
  int rez = v[0];
  for (int i = 0; i < v.size(); i++)
    if (v[i] < rez) rez = v[i];
  return rez;
}
long MinInLongVec(std::vector<long> v) {
  long rez = v[0];
  for (int i = 0; i < v.size(); i++)
    if (v[i] < rez) rez = v[i];
  return rez;
}
int SumInVec(std::vector<int> v) {
  int rez = 0;
  for (int i = 0; i < v.size(); i++) rez += v[i];
  return rez;
}
int FindInt(std::vector<int> v, int x) {
  for (int i = 0; i < v.size(); i++)
    if (v[i] == x) return i;
  return -1;
}
int FindString(std::vector<std::string> v, std::string x) {
  for (int i = 0; i < v.size(); i++)
    if (v[i] == x) return i;
  return -1;
}
void PrintIntVec(std::vector<int> v) {
  for (int i = 0; i < v.size(); i++) {
    std::cout << v[i] << " ";
  }
  std::cout << std::endl;
}
bool IsLetter(char c) {
  if ((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z')) return true;
  return false;
}
int main() {
  int n, d;
  cin >> n >> d;
  vector<pair<int, int>> ver(4);
  ver[0] = make_pair(0, d);
  ver[1] = make_pair(d, 0);
  ver[2] = make_pair(n, n - d);
  ver[3] = make_pair(n - d, n);
  int m;
  cin >> m;
  vector<pair<int, int>> kuz(m);
  for (int i = 0; i < m; i++) {
    cin >> kuz[i].first >> kuz[i].second;
  }
  for (int i = 0; i < m; i++) {
    float angle = 0.0f;
    for (int j = 0; j < 4; j++) {
      pair<int, int> p1;
      p1.first = ver[j].first - kuz[i].first;
      p1.second = ver[j].second - kuz[i].second;
      pair<int, int> p2;
      if (j != 3) {
        p2.first = ver[j + 1].first - kuz[i].first;
        p2.second = ver[j + 1].second - kuz[i].second;
      } else {
        p2.first = ver[0].first - kuz[i].first;
        p2.second = ver[0].second - kuz[i].second;
      }
      float co = (p1.first * p2.first + p1.second * p2.second) /
                 (sqrt(pow(p1.first, 2) + pow(p1.second, 2)) *
                  sqrt(pow(p2.first, 2) + pow(p2.second, 2)));
      angle += acos(co);
    }
    if (abs(angle - 2 * 3.1415926535) < 0.0001f ||
        (kuz[i] == ver[0] || kuz[i] == ver[1] || kuz[i] == ver[2] ||
         kuz[i] == ver[3])) {
      cout << "YES" << endl;
    } else {
      cout << "NO" << endl;
    }
  }
  return 0;
}
