#include <bits/stdc++.h>
using namespace std;
const int inf = 1e9 + 5;
const long long infll = 9e18 + 5ll;
const long double eps = 1e-9;
const int maxn = 1e5 + 100;
const long long maxlog = 21;
const int P = 97;
const int mod = 1e9 + 7;
int a, b, n;
int d[222][222];
int main() {
  if (fopen("sorting"
            ".in",
            "r"))
    freopen(
        "sorting"
        ".in",
        "r", stdin),
        freopen(
            "sorting"
            ".out",
            "w", stdout);
  ;
  cin >> a >> b;
  cin >> n;
  int cur1 = 0, cur2 = b;
  for (int i = 1; i <= b + 1; ++i) {
    if (cur2 > 0) d[cur1][cur2] = 1;
    ++cur1;
    --cur2;
  }
  cur1 = 0;
  cur2 = b;
  for (int i = 1; i <= a + 1; ++i) {
    d[cur1][cur2] = 1;
    ++cur1;
    ++cur2;
  }
  cur1 = b;
  cur2 = 0;
  for (int i = 1; i <= a + 1; ++i) {
    d[cur1][cur2] = 1;
    ++cur1;
    ++cur2;
  }
  cur1 = abs(a - b);
  cur2 = a;
  for (int i = 1; i <= b + 1; ++i) {
    if (cur2 > 0) d[cur1][cur2] = 1;
    ++cur1;
    --cur2;
  }
  for (int i = 1; i < a; ++i) {
    bool tr = 0;
    for (int j = 0; j <= 100; ++j) {
      if (d[i][j] == 1 && !tr) {
        tr = 1;
      } else if (d[i][j] == 1 && tr) {
        break;
      }
      d[i][j] = tr;
    }
  }
  for (int i = 1, x, y; i <= n; ++i) {
    cin >> x >> y;
    if (d[x][y])
      cout << "YES\n";
    else
      cout << "NO\n";
  }
  return 0;
}
