#include <bits/stdc++.h>
using namespace std;
const long long int mod = 1e9 + 7;
int n, m, k;
long long int ans;
long long int val[2222], dp[222222];
pair<int, int> arr[2222];
long long int calc(long long int now, long long int num) {
  if (num == 0) return 1;
  if (num == 1) return now;
  long long int now2 = calc(now, num / 2);
  if (num % 2 == 0) return (now2 * now2) % mod;
  return (((now2 * now2) % mod) * now) % mod;
}
long long int divs(long long int n, long long int k) {
  return (n * calc(k, mod - 2)) % mod;
}
long long int recur(int t) {
  if (val[t] != -1) return val[t];
  int second = arr[t].first;
  int first = arr[t].second;
  val[t] = divs(dp[second + first - 2], (dp[second - 1] * dp[first - 1]) % mod);
  for (int e = 0; e < k; e++) {
    if (e == t) continue;
    if (arr[e].second <= arr[t].second && arr[e].first <= arr[t].first) {
      long long int vvv = recur(e);
      long long int yy = arr[t].first - arr[e].first;
      long long int xx = arr[t].second - arr[e].second;
      long long int vvv2 = divs(dp[yy + xx], (dp[yy] * dp[xx]) % mod);
      vvv = (vvv * vvv2) % mod;
      val[t] = (val[t] - vvv + mod) % mod;
    }
  }
  return val[t];
}
int main(void) {
  dp[0] = 1;
  for (long long int e = 1; e < 222222; e++) dp[e] = (dp[e - 1] * e) % mod;
  memset(val, -1, sizeof(val));
  scanf("%d%d%d", &n, &m, &k);
  for (int e = 0; e < k; e++) {
    int second, first;
    scanf("%d%d", &second, &first);
    arr[e] = make_pair(second, first);
  }
  ans = divs(dp[n + m - 2], (dp[n - 1] * dp[m - 1]) % mod);
  for (int e = 0; e < k; e++) {
    long long int vals = recur(e);
    int yy = (n - arr[e].first);
    int xx = (m - arr[e].second);
    long long int vv = divs(dp[yy + xx], (dp[yy] * dp[xx]) % mod);
    ans = ((ans - vv * vals) % mod + mod) % mod;
  }
  printf("%lld", ans);
  return 0;
}
