#include <bits/stdc++.h>
long long pow(int a, int b) {
  if (b == 0 || a == 1) return 1;
  if (b % 2 == 0)
    return pow(a, b / 2) * pow(a, b / 2);
  else
    return pow(a, b / 2) * pow(a, b / 2) * a;
}
long long gcd(long long a, long long b) {
  if (a == 0) return b;
  if (b == 0) return a;
  if (a > b)
    return gcd(a % b, b);
  else
    return gcd(b % a, a);
}
using namespace std;
int main() {
  int a, b;
  cin >> a >> b;
  int c;
  cin >> c;
  int m1[c], m2[c];
  int ans[c];
  int d = max(a, b);
  for (int i = 0; i < c; i++) {
    cin >> m1[i] >> m2[i];
    ans[i] = 0;
    if (m1[i] > d || m2[i] > d) ans[i] = 1;
    if (m1[i] + m2[i] < b || m1[i] + m2[i] > a + a - b) ans[i] = 1;
    if (abs(m1[i] - m2[i]) > b) ans[i] = 1;
  }
  for (int i = 0; i < c; i++)
    if (ans[i] == 0)
      cout << "YES\n";
    else
      cout << "NO\n";
  return 0;
}
