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