#include <bits/stdc++.h>
using namespace std;
const int mod = 1000000007;
const int MAXN = 200005;
int sil[MAXN];
int odwr[MAXN];
int qp(int a, int b) {
  if (b == 0) return 1;
  int second = qp(a, b / 2);
  second = 1LL * second * second % mod;
  if (b % 2) second = 1LL * a * second % mod;
  return second;
}
int W[MAXN];
pair<int, int> E[MAXN];
int sciez(int a, int b) {
  return 1LL * sil[a + b] * odwr[a] % mod * odwr[b] % mod;
}
int main() {
  int H, WW, n;
  scanf("%d%d%d", &H, &WW, &n);
  for (int i = 0; i < (n); ++i) scanf("%d%d", &E[i].first, &E[i].second);
  sil[0] = 1;
  for (int i = 0; i < (MAXN - 1); ++i)
    sil[i + 1] = 1LL * sil[i] * (i + 1) % mod;
  for (int i = 0; i < (MAXN); ++i) odwr[i] = qp(sil[i], mod - 2);
  sort(E, E + n);
  n = unique(E, E + n) - E;
  for (int i = 0; i < (n); ++i) {
    W[i] = sciez(E[i].first - 1, E[i].second - 1);
    for (int j = 0; j < (i); ++j)
      if (E[j].first <= E[i].first && E[j].second <= E[i].second)
        W[i] = (mod + W[i] -
                (1LL * W[j] *
                 sciez(E[i].first - E[j].first, E[i].second - E[j].second) %
                 mod)) %
               mod;
  }
  int ret = sciez(H - 1, WW - 1);
  for (int i = 0; i < (n); ++i)
    ret = (mod + ret -
           (1LL * W[i] * sciez(H - E[i].first, WW - E[i].second)) % mod) %
          mod;
  printf("%d\n", ret);
  return 0;
}
