#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, k;
  scanf("%d%d%d", &n, &m, &k);
  int mn = 1e9;
  while (k--) {
    int x, y;
    scanf("%d%d", &x, &y);
    mn = min(mn, min(x - 1, n - x));
    mn = min(mn, min(y - 1, m - y));
  }
  if (mn > 4)
    printf("NO");
  else
    printf("YES");
  return 0;
}
