#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
void err(istream_iterator<string> it) {}
template <typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
  cerr << *it << " = " << a << "\n";
  err(++it, args...);
}
long long powm(long long a, long long b, long long mod) {
  long long res = 1;
  while (b) {
    if (b & 1) res = (res * a) % mod;
    a = (a * a) % mod;
    b >>= 1;
  }
  return res;
}
int db = 0;
const long long mod = 1e9 + 7;
const long long N = 1000005;
const long long inf = 1e9;
void solve() {
  long long n, m, k;
  cin >> n >> m >> k;
  set<int> cols[n + 2], rows[m + 2];
  for (long long i = 0; i < (k); i++) {
    int x, y;
    cin >> x >> y;
    cols[x].insert(y);
    rows[y].insert(x);
  }
  for (long long i = 0; i < (n + 2); i++)
    cols[i].insert(0), cols[i].insert(m + 1);
  for (long long i = 0; i < (m + 2); i++)
    rows[i].insert(0), rows[i].insert(n + 1);
  long long cnt = 0;
  int lo_x = 1, lo_y = 0, hi_x = n + 1, hi_y = m + 1;
  int px = 0, py = 1;
  function<void(int, int, int)> dfs = [&](int x, int y, int direction) {
    if (direction == 0) {
      y = min(*upper_bound(cols[x].begin(), cols[x].end(), y) - 1, hi_y - 1);
      hi_y = y;
    } else if (direction == 1) {
      x = min(hi_x - 1, *upper_bound(rows[y].begin(), rows[y].end(), x) - 1);
      hi_x = x;
    } else if (direction == 2) {
      y = max(lo_y + 1, *--upper_bound(cols[x].begin(), cols[x].end(), y) + 1);
      lo_y = y;
    } else if (direction == 3) {
      x = max(lo_x + 1, *--upper_bound(rows[y].begin(), rows[y].end(), x) + 1);
      lo_x = x;
    }
    if (x == px and y == py) return;
    cnt += abs(py - y) + abs(px - x);
    px = x;
    py = y;
    dfs(x, y, (direction + 1) % 4);
  };
  dfs(1, 1, 0);
  if (cnt == n * m - k)
    cout << "YES\n";
  else {
    cout << "NO\n";
  }
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0), cout.tie(0);
  int tc = 1;
  for (int t = 1; t <= tc; t++) {
    solve();
  }
  return 0;
}
