#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, k, x, y;
  scanf("%d%d%d", &n, &m, &k);
  bool f = false;
  while (k--) {
    scanf("%d%d", &x, &y);
    int mn = (1 << 20);
    for (int i = 1; i <= n; ++i)
      for (int j = 1; j <= m; ++j)
        if (i == 1 || j == 1 || i == n || j == m)
          mn = min(mn, abs(i - x) + abs(j - y));
    if (mn <= 4) f = true;
  }
  if (f)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
}
