#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
int n, m, k;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> m >> k;
  int md = MOD;
  for (int i = 0; i < k; i++) {
    int x, y;
    cin >> x >> y;
    int dl = x - 1, db = y - 1;
    int dr = n - x, dt = m - y;
    int nd = min(min(dl, dr), min(db, dt));
    md = min(md, nd);
  }
  cout << (md <= 4 ? "YES" : "NO") << endl;
}
