#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 1;
long long n, m, k, ans = 1;
vector<int> r[maxn], c[maxn];
int main() {
  scanf("%lld%lld%lld", &n, &m, &k);
  for (int i = 1; i <= k; ++i) {
    int x, y;
    scanf("%d%d", &x, &y);
    r[x].push_back(y);
    c[y].push_back(x);
  }
  for (int i = 1; i <= n; ++i) sort(r[i].begin(), r[i].end());
  for (int i = 1; i <= m; ++i) sort(c[i].begin(), c[i].end());
  int now = 0, up = 0, down = n + 1, right = m + 1, left = 0, size, x = 1,
      y = 1, first = 0;
  while (1) {
    int tx, ty;
    if (now == 0) {
      size = lower_bound(r[x].begin(), r[x].end(), y) - r[x].begin();
      up = tx = x;
      ty = (size == r[x].size()) ? right - 1 : min(right - 1, r[x][size] - 1);
    }
    if (now == 1) {
      size = lower_bound(c[y].begin(), c[y].end(), x) - c[y].begin();
      ty = right = y;
      tx = (size == c[y].size()) ? down - 1 : min(down - 1, c[y][size] - 1);
    }
    if (now == 2) {
      size = lower_bound(r[x].begin(), r[x].end(), y) - r[x].begin() - 1;
      down = tx = x;
      ty = (size < 0) ? left + 1 : max(left + 1, r[x][size] + 1);
    }
    if (now == 3) {
      size = lower_bound(c[y].begin(), c[y].end(), x) - c[y].begin() - 1;
      left = ty = y;
      ;
      tx = (size < 0) ? up + 1 : max(up + 1, c[y][size] + 1);
    }
    if (tx == x && ty == y && first) break;
    now = (now + 1) % 4;
    ans += abs(tx - x) + abs(ty - y);
    x = tx;
    y = ty;
    first = 1;
  }
  printf("%s\n", (ans == n * m - k) ? "YES" : "NO");
}
