#include <bits/stdc++.h>
using namespace std;
const long long INF = 1000000000000000;
long long ans = INF;
char b[3];
void f(vector<long long> a, int g) {
  if (a.size() == 1) {
    if (a[0] < ans) {
      ans = a[0];
    }
  } else {
    for (int i = 0; i < a.size(); i++) {
      for (int e = 0; e < a.size(); e++) {
        if (i != e) {
          vector<long long> c1;
          if (b[g] == '+')
            c1.push_back(a[i] + a[e]);
          else
            c1.push_back(a[i] * a[e]);
          for (int f = 0; f < a.size(); f++) {
            if (f != i && f != e) {
              c1.push_back(a[f]);
            }
          }
          f(c1, g + 1);
        }
      }
    }
  }
}
int main() {
  int n, m, k;
  cin >> n >> m >> k;
  bool ans = 1;
  for (int i = 0; i < k; i++) {
    int x, y;
    cin >> x >> y;
    if (n - x <= 4 || x <= 5) {
      ans = 0;
    }
    if (m - y <= 4 || y <= 5) {
      ans = 0;
    }
  }
  if (ans)
    cout << "NO";
  else
    cout << "YES";
  return 0;
}
