#include <bits/stdc++.h>
using namespace std;
using int64 = long long;
set<int64> sets[4];
int64 n, m, k;
bool solve() {
  int64 l = 0, r = m, u = 0, d = n;
  for (int64 i = 0; k > 0; i++) {
    auto &a = sets[i % 4];
    auto from = u * m + l, to = u * m + r;
    auto p = a.lower_bound(from);
    auto s = (p != end(a)) ? min(*p - from + l, r) : r;
    if (k < (r - s) * (d - u)) return false;
    for (int64 i = s; i < r; i++)
      for (int64 j = u; j < d; j++, k--)
        if (a.find(j * m + i) == end(a)) return false;
    r = s;
    tie(l, r, u, d, n, m) = make_tuple(u + 1, d, m - r, m - l, m, n);
  }
  return true;
}
int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(0);
  cin >> n >> m >> k;
  for (int64 i = 0; i < k; i++) {
    int64 x, y;
    cin >> x >> y;
    x--;
    y--;
    for (int64 j = 0; j < 4; j++) {
      sets[j].insert(m * x + y);
      tie(x, y, n, m) = make_tuple(m - 1 - y, x, m, n);
    }
  }
  cout << (solve() ? "YES" : "NO");
}
