#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, k, ok = 0, x, y;
  cin >> n >> m >> k;
  for (int i = 1; i <= k; ++i) {
    cin >> x >> y;
    if (x <= 5 || y <= 5 || x >= n - 4 || y >= m - 4) ok = 1;
  }
  if (ok)
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
