#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:16777216")
using namespace std;
const int INF = (1 << 30) - 1;
const double EPS = 1e-9;
int n, m, k;
int x[105];
int y[105];
void Load() {
  scanf("%d%d%d", &n, &m, &k);
  for (int i = 0; i < k; i++) {
    scanf("%d%d", &x[i], &y[i]);
    x[i]--, y[i]--;
  }
}
const int di[4] = {0, 1, -1, 0};
const int dj[4] = {1, 0, 0, -1};
inline bool Good(int i, int j) { return 0 <= i && i < n && 0 <= j && j < m; }
int d[105][105];
void Solve() {
  memset(d, 0x7F, sizeof(d));
  vector<pair<int, int> > q;
  int hd = 0;
  for (int i = 0; i < k; i++) {
    d[x[i]][y[i]] = 0;
    q.push_back(make_pair(x[i], y[i]));
  }
  int i, j;
  int ni, nj;
  while (hd < (int)q.size()) {
    i = q[hd].first;
    j = q[hd].second;
    hd++;
    for (int p = 0; p < 4; p++) {
      ni = i + di[p];
      nj = j + dj[p];
      if (Good(ni, nj) && d[ni][nj] > d[i][j] + 1) {
        d[ni][nj] = d[i][j] + 1;
        q.push_back(make_pair(ni, nj));
      }
    }
  }
  int c = 0;
  for (int i = 0; i < n; i++) {
    if (d[i][0] <= 4) c++;
    if (d[i][m - 1] <= 4) c++;
  }
  for (int j = 0; j < m; j++) {
    if (d[0][j] <= 4) c++;
    if (d[n - 1][j] <= 4) c++;
  }
  cout << (c >= 1 ? "YES" : "NO");
}
int main() {
  Load();
  Solve();
  return 0;
}
