#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:64000000")
using namespace std;
int main() {
  int n, m, k;
  cin >> n >> m >> k;
  if (k == 0) {
    cout << "NO";
    return 0;
  }
  vector<int> x(k);
  vector<int> y(k);
  for (int i = 0; i < k; ++i) {
    cin >> x[i] >> y[i];
    --x[i];
    --y[i];
  }
  vector<int> dist(k);
  for (int i = 0; i < k; ++i) {
    dist[i] = x[i];
    dist[i] = min(dist[i], y[i]);
    dist[i] = min(dist[i], n - 1 - x[i]);
    dist[i] = min(dist[i], m - 1 - y[i]);
  }
  int mi = *::min_element((dist).begin(), (dist).end());
  if (mi <= 4)
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
