#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, k, x, y;
  while (~scanf("%d%d%d", &n, &m, &k)) {
    int flag = 0;
    while (k--) {
      scanf("%d%d", &x, &y);
      if (x <= 5 || x >= n - 4 || y <= 5 || y >= m - 4) flag = 1;
    }
    printf("%s\n", flag ? "YES" : "NO");
  }
  return 0;
}
