#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 5;
const int MOD = 1000000007;
int r, c, k;
pair<int, int> a[N];
long long int Fact[N];
long long int dp[N];
long long int modInv[N];
bool cmp(pair<int, int> first, pair<int, int> second) {
  if (first.first == second.first) return first.second < second.second;
  return first.first < second.first;
}
long long int BigMod(long long int b, long long int p, long long int mod) {
  long long int res = 1 % mod, first = b % mod;
  while (p) {
    if (p & 1) res = (res * first) % mod;
    first = (first * first) % mod;
    p >>= 1;
  }
  return (res % mod);
}
long long int ModInv(long long int val, long long int mod) {
  return BigMod(val, mod - 2, mod);
}
void preCalc() {
  Fact[0] = 1LL;
  for (int i = 1; i < 2 * N; i++) {
    Fact[i] = (Fact[i - 1] % MOD * i % MOD) % MOD;
  }
  modInv[N - 1] = ModInv(Fact[N - 1], MOD);
  for (int i = N - 2; i >= 0; i--) {
    modInv[i] = (modInv[i + 1] % MOD * (i + 1) % MOD) % MOD;
  }
}
long long int nCr(long long int n, long long int r) {
  if (r > n) return 0;
  long long int val = Fact[n];
  val = (val % MOD * modInv[r] % MOD) % MOD;
  val = (val % MOD * modInv[n - r] % MOD) % MOD;
  return val;
}
long long int Ways(int x1, int y1, int x2, int y2) {
  if (x1 > x2 || y1 > y2) return 0;
  long long int step = (x2 - x1 + y2 - y1);
  long long int r = (y2 - y1);
  return nCr(step, r);
}
void compute() {
  dp[1] = Ways(1, 1, a[1].first, a[1].second);
  for (int i = 2; i <= k; i++) {
    dp[i] = Ways(1, 1, a[i].first, a[i].second);
    long long int subtract = 0;
    for (int j = 1; j < i; j++) {
      subtract +=
          dp[j] * Ways(a[j].first, a[j].second, a[i].first, a[i].second);
      subtract = subtract % MOD;
    }
    dp[i] -= subtract, dp[i] += MOD, dp[i] %= MOD;
  }
}
int main(int argc, char const *argv[]) {
  preCalc();
  scanf("%d %d %d", &r, &c, &k);
  for (int i = 1; i <= k; i++) scanf("%d %d", &a[i].first, &a[i].second);
  sort(a + 1, a + k + 1, cmp);
  compute();
  long long int ans = Ways(1, 1, r, c);
  long long int subtract = 0;
  for (int i = 1; i <= k; i++) {
    subtract += dp[i] * Ways(a[i].first, a[i].second, r, c);
    subtract %= MOD;
  }
  ans -= subtract, ans += MOD, ans %= MOD;
  printf("%lld\n", ans);
  return 0;
}
