#include <bits/stdc++.h>
using namespace std;
long long my_pow(long long a, long long b) {
  if (b == 0) {
    return 1;
  } else if (b == 1) {
    return (a % 1000000007);
  }
  long long half_a = my_pow(a, b / 2);
  long long ans = (half_a * half_a) % 1000000007;
  if (b % 2) {
    ans = (ans * a) % 1000000007;
  }
  return ans;
}
long long get_val(long long m, long long n, vector<long long> &F,
                  vector<long long> &RF) {
  long long ans = F[m + n - 2];
  ans = (ans * RF[n - 1]) % 1000000007;
  ans = (ans * RF[m - 1]) % 1000000007;
  return ans;
}
int main() {
  long long h, w, n;
  cin >> h >> w >> n;
  vector<pair<long long, long long> > V(n);
  for (long long i = 0; i < n; ++i) {
    cin >> V[i].first >> V[i].second;
  }
  sort(V.begin(), V.end());
  long long K = h + w + 10;
  vector<long long> F(K);
  vector<long long> RF(K);
  F[0] = 1;
  for (long long i = 1; i < K; ++i) {
    F[i] = (F[i - 1] * i) % 1000000007;
  }
  for (long long i = 0; i < K; ++i) {
    RF[i] = my_pow(F[i], 1000000007 - 2);
  }
  vector<long long> C(n);
  C[0] = get_val(V[0].first, V[0].second, F, RF);
  for (long long i = 1; i < n; ++i) {
    long long ans = get_val(V[i].first, V[i].second, F, RF);
    for (long long j = 0; j < i; ++j) {
      if (V[j].second <= V[i].second) {
        long long ans1 =
            (C[j] * get_val(V[i].first - V[j].first + 1,
                            V[i].second - V[j].second + 1, F, RF)) %
            1000000007;
        ans = (ans - ans1 + 1000000007) % 1000000007;
      }
    }
    C[i] = ans;
  }
  long long ans = get_val(h, w, F, RF);
  for (long long i = 0; i < n; ++i) {
    long long ans1 =
        (C[i] * get_val(h - V[i].first + 1, w - V[i].second + 1, F, RF)) %
        1000000007;
    ans = (ans - ans1 + 1000000007) % 1000000007;
  }
  cout << ans << endl;
}
