#include <bits/stdc++.h>
using namespace std;
const int N = 1e5;
const int INF = 1e9 + 1;
const int mod = 1e9 + 7;
int n, m;
pair<int, int> a[2001];
long long fact[2 * N];
long long inv[2 * N];
long long ans[2000 + 1];
long long binPow(long long mean, int deg) {
  long long fun = 1;
  if (deg > 0) {
    fun = binPow(mean, deg / 2);
    fun *= fun;
    fun %= mod;
    if (deg % 2) {
      fun = (fun * mean) % mod;
    }
  }
  return fun;
}
int main() {
  int k;
  scanf("%d%d%d", &n, &m, &k);
  for (int i = 0; i < k; i++) {
    scanf("%d%d", &a[i].first, &a[i].second);
  }
  sort(a, a + k);
  a[k] = make_pair(n, m);
  for (int i = 0; i < n + m + 1; i++) {
    if (!i) {
      fact[i] = 1;
      continue;
    }
    fact[i] = fact[i - 1] * (long long)(i);
    fact[i] %= mod;
    inv[i] = binPow(fact[i], mod - 2);
  }
  inv[0] = inv[1];
  for (int i = 0; i < k + 1; i++) {
    ans[i] = (fact[a[i].first + a[i].second - 2] * inv[a[i].first - 1]) % mod;
    ans[i] = (ans[i] * inv[a[i].second - 1]) % mod;
    for (int j = 0; j < i; j++) {
      if (a[j].first <= a[i].first && a[j].second <= a[i].second) {
        long long sub =
            (ans[j] *
             fact[a[i].first + a[i].second - a[j].first - a[j].second]) %
            mod;
        sub = (sub * inv[a[i].first - a[j].first]) % mod;
        sub = (sub * inv[a[i].second - a[j].second]) % mod;
        ans[i] = (ans[i] + (long long)mod - sub) % mod;
      }
    }
  }
  printf("%I64d", ans[k]);
}
