#include <bits/stdc++.h>
using namespace std;
const long long mxn = 2005;
const long long mxm = 2e5 + 5;
const long long MOD = 1e9 + 7;
long long h, w, n;
long long f[mxn], fac[mxm];
pair<long long, long long> a[mxn];
void init() {
  fac[0] = 1;
  for (long long i = 1; i < mxm; i++) fac[i] = fac[i - 1] * i % MOD;
}
long long mu(long long u, long long v) {
  long long res = 1;
  while (v > 0) {
    if (v % 2) res = res * u % MOD;
    u = u * u % MOD;
    v /= 2;
  }
  return res;
}
long long C(long long u, long long v) {
  long long ans = fac[v - 1] * mu(fac[v - u] * fac[u - 1] % MOD, MOD - 2) % MOD;
  return ans;
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  init();
  cin >> h >> w >> n;
  for (long long i = 1; i <= n; i++) cin >> a[i].first >> a[i].second;
  sort(a + 1, a + 1 + n);
  for (long long i = 1; i <= n; i++) {
    long long u = a[i].first - 1;
    long long v = a[i].second - 1;
    if (u == 0 || v == 0)
      f[i] = 1;
    else
      f[i] = C(u + 1, v + u + 1);
  }
  for (long long i = 1; i <= n; i++) {
    for (long long j = 1; j < i; j++) {
      if (a[j].first <= a[i].first && a[j].second <= a[i].second) {
        long long u = a[i].first - a[j].first;
        long long v = a[i].second - a[j].second;
        if (u == 0 || v == 0)
          f[i] = (f[i] - f[j] + MOD) % MOD;
        else
          f[i] = (f[i] - f[j] * C(u + 1, v + u + 1) % MOD + MOD * MOD) % MOD;
      }
    }
  }
  for (long long i = 1; i <= n; i++) {
    long long u = h - a[i].first;
    long long v = w - a[i].second;
    f[i] = f[i] * C(u + 1, v + u + 1) % MOD;
  }
  long long u = h - 1;
  long long v = w - 1;
  long long ans = C(u + 1, u + v + 1);
  for (long long i = 1; i <= n; i++) ans = (ans - f[i] + MOD * MOD) % MOD;
  cout << ans;
}
