#include <bits/stdc++.h>
using namespace std;
const int maxn = 2005;
const int inf = (1 << 28) - 1;
const long long MOD = 1000000007;
const long long mod = 1000000007;
long long fac[1000005], inv[1000005];
long long quick_pow(long long a, long long b) {
  long long res = 1, tmp = a;
  while (b) {
    if (b & 1) res = (res * tmp) % mod;
    tmp = (tmp * tmp) % mod;
    b /= 2;
  }
  return res;
}
long long C(long long n, long long m) {
  if (m > n | m < 0) return 0;
  return fac[n] * (inv[n - m] * inv[m] % mod) % mod;
}
void init() {
  fac[0] = inv[0] = 1;
  for (int i = 1; i < 1000005; ++i) {
    fac[i] = (fac[i - 1] * i) % mod;
    inv[i] = quick_pow(fac[i], mod - 2);
  }
}
long long GetDis(long long x1, long long y1, long long x2, long long y2) {
  return C(x2 - x1 + y2 - y1, x2 - x1);
}
pair<long long, long long> Par[maxn];
long long Dis[maxn];
int main() {
  init();
  int h, w, n;
  scanf("%d%d%d", &h, &w, &n);
  for (int i = 0; i < n; ++i) scanf("%lld%lld", &Par[i].first, &Par[i].second);
  sort(Par, Par + n);
  long long Ans = GetDis(1, 1, h, w);
  for (int i = 0; i < n; ++i) {
    Dis[i] = GetDis(1, 1, Par[i].first, Par[i].second);
    for (int j = 0; j < i; ++j)
      if (Par[i].first >= Par[j].first && Par[i].second >= Par[j].second) {
        Dis[i] = (Dis[i] -
                  (Dis[j] * GetDis(Par[j].first, Par[j].second, Par[i].first,
                                   Par[i].second)) %
                      MOD +
                  MOD) %
                 MOD;
      }
    Ans = (Ans - (Dis[i] * GetDis(Par[i].first, Par[i].second, h, w)) % MOD +
           MOD) %
          MOD;
  }
  printf("%lld\n", Ans);
  return 0;
}
