#include <bits/stdc++.h>
using namespace std;
bool solve2(int N, int M, int wx, int x, int v, int d) {
  const int NW = N * 2 + M * 2;
  vector<bool> ws(NW, false);
  for (int i = 0; i != d; ++i) {
    const int idx = (i + wx) % NW;
    ws[idx] = true;
  }
  int xw = (v > 0) ? ((wx + d - 1) % NW) : ((NW + wx) % NW);
  for (int t = 0; t < NW; ++t) {
    const bool at_w1 = (x == NW - 1) || (x == N - 1) || (x == N + M - 1) ||
                       (x == 2 * N + M - 1);
    const bool at_w2 = (x == 0) || (x == N) || (x == N + M) || (x == 2 * N + M);
    const bool at_w = at_w1 || at_w2;
    if (at_w) {
      if (!ws[x]) return true;
      if (at_w1 && !ws[(x + 1) % NW]) return true;
      if (at_w2 && !ws[(NW + x - 1) % NW]) return true;
      x += v * 2;
    } else {
      if (!ws[x]) return true;
      x += v;
    }
    xw += v;
    x = (NW + x) % NW;
    xw = (NW + xw) % NW;
    ws[xw] = true;
  }
  return false;
}
bool solve(int N, int M, int K, const vector<int>& xs, const vector<int>& ys) {
  if (K == 0) return false;
  int dmin(1000);
  int i_dmin(-1);
  for (int i = 0; i != K; ++i) {
    const int dx = min(xs[i] - 1, N - xs[i]);
    const int dy = min(ys[i] - 1, M - ys[i]);
    const int d = min(dx, dy);
    if (d < dmin) {
      dmin = d;
      i_dmin = i;
    }
  }
  if (dmin == 0) return true;
  const int dx = min(xs[i_dmin] - 1, N - xs[i_dmin]);
  const int dy = min(ys[i_dmin] - 1, M - ys[i_dmin]);
  const int d = min(dx, dy);
  const int x = max(dx, dy);
  const int NW = N * 2 + M * 2;
  bool result(true);
  for (int wx = 0; wx != NW; ++wx) {
    result = result && solve2(N, M, wx, x, 1, d);
    result = result && solve2(N, M, wx, x, -1, d);
  }
  return result;
}
int main(int argc, char* argv[]) {
  int N, M, K;
  cin >> N >> M >> K;
  vector<int> xs(K), ys(K);
  for (int i = 0; i != K; ++i) {
    cin >> xs[i] >> ys[i];
  }
  cout << (solve(N, M, K, xs, ys) ? "YES" : "NO") << endl;
  return 0;
}
