#include <bits/stdc++.h>
using namespace std;
const int MAXN = 200005;
const int MOD = 1000000007;
long long n, h, w;
long long fact[MAXN], inv[MAXN];
long long x[MAXN], y[MAXN];
long long dp[MAXN];
long long mul(long long a, long long b) { return a * b % MOD; }
long long sub(long long a, long long b) {
  if (a - b < 0) return a - b + MOD;
  return a - b;
}
long long pot(long long a, long long p) {
  if (p == 0) return 1;
  if (p & 1) {
    return mul(pot(a, p - 1), a);
  } else {
    long long t = pot(a, p >> 1);
    return mul(t, t);
  }
}
void precompute() {
  fact[0] = inv[0] = 1;
  for (int i = 1; i < MAXN; i++) {
    fact[i] = mul(fact[i - 1], i);
    inv[i] = pot(fact[i], MOD - 2);
  }
}
long long nck(long long nn, long long kk) {
  return mul(fact[nn], mul(inv[kk], inv[nn - kk]));
}
long long f(long long pos) {
  if (dp[pos] != -1) return dp[pos];
  dp[pos] = 0;
  for (int i = 0; i <= n; i++) {
    if (pos != i && x[pos] <= x[i] && x[i] <= h && y[pos] <= y[i] &&
        y[i] <= w) {
      int a = nck(h - x[i] + w - y[i], h - x[i]);
      int b = nck(x[i] - x[pos] + y[i] - y[pos], x[i] - x[pos]);
      dp[pos] += mul(b, sub(a, f(i)));
      if (dp[pos] >= MOD) dp[pos] -= MOD;
    }
  }
  return dp[pos];
}
int main() {
  memset(dp, -1, sizeof dp);
  precompute();
  cin >> h >> w >> n;
  x[0] = y[0] = 1;
  for (int i = 1; i <= n; i++) {
    cin >> x[i] >> y[i];
  }
  cout << sub(nck(h + w - 2, h - 1), f(0));
  return 0;
}
