#include <bits/stdc++.h>
using namespace std;
int n, m, k;
bool OK = true;
int main() {
  int i, x, y;
  cin >> n >> m >> k;
  while (k-- > 0) {
    cin >> x >> y;
    if (x <= 5 || y <= 5 || x > n - 5 || y > m - 5) OK = false;
  }
  cout << (OK ? "NO\n" : "YES\n");
  return 0;
}
