#include <bits/stdc++.h>
int F, R, C, K, RR[101], CC[101];
int main() {
  scanf("%d%d%d", &R, &C, &K);
  F = 0;
  for (int(x) = (1); (x) <= (K); (x) += (1)) scanf("%d%d", &RR[x], &CC[x]);
  for (int(x) = (1); (x) <= (K); (x) += (1))
    if (RR[x] - 4 <= 1 || RR[x] + 4 >= R || CC[x] - 4 <= 1 || CC[x] + 4 >= C)
      F = 1;
  if (F == 0)
    printf("NO");
  else
    printf("YES");
}
