#include <bits/stdc++.h>
using namespace std;
const int mn = 103;
int m, n, k;
pair<int, int> inp[mn];
int main() {
  cin >> m >> n >> k;
  for (int i = 0; i < k; i++) cin >> inp[i].first >> inp[i].second;
  int ans = 0;
  for (int i = 0; i < k; i++) {
    int req = min(min(inp[i].first, m - inp[i].first + 1),
                  min(inp[i].second, n - inp[i].second + 1));
    if (req <= 5) ans = 1;
  }
  if (ans == 0)
    cout << "NO" << endl;
  else
    cout << "YES" << endl;
  return 0;
}
