#include <bits/stdc++.h>
using namespace std;
const int mod = 1000 * 1000 * 1000 + 7;
const int INF = 1000 * 1000 * 1000;
const long long LINF = (long long)INF * INF;
int n, m, k;
pair<int, int> p[110];
int d[110];
int32_t main(void) {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  cin >> n >> m >> k;
  if (k == 0) {
    cout << "NO\n";
    return 0;
  }
  for (int i = (0); i < (k); i++) {
    cin >> p[i].first >> p[i].second;
    d[i] =
        min({p[i].first - 1, n - p[i].first, p[i].second - 1, m - p[i].second});
  }
  int mn = *min_element(d, d + k);
  if (mn > 4)
    cout << "NO\n";
  else
    cout << "YES\n";
  return 0;
}
