#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n, m, k;
  cin >> n >> m >> k;
  int best = 1e9;
  for (int i = 0; i < k; i++) {
    int x, y;
    cin >> x >> y;
    best = min(best, x - 1);
    best = min(best, n - x);
    best = min(best, y - 1);
    best = min(best, m - y);
  }
  if (best > 4)
    cout << "NO\n";
  else
    cout << "YES\n";
}
