#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int> > v;
long long int fac[200008];
bool cmp(pair<int, int> p1, pair<int, int> p2) {
  if (p1.first < p2.first)
    return true;
  else if ((p1.first) == (p2.first)) {
    if (p1.second < p2.second)
      return true;
    else
      return false;
  } else
    return false;
}
long long int binexpo(long long int a, long long int b) {
  long long int res = 1;
  while (b > 0) {
    if (b % 2) res = (res * a) % 1000000007;
    a = (a * a) % 1000000007;
    b = b / 2;
  }
  return res;
}
void seive() {
  long long int i, j;
  fac[0] = 1;
  for (i = 1; i < 200008; i++) {
    fac[i] = (fac[i - 1] * i) % 1000000007;
  }
  return;
}
int main() {
  seive();
  int h, w, n, i, j, k, l;
  cin >> h >> w >> n;
  for (i = 0; i < n; i++) {
    cin >> j >> k;
    v.push_back(make_pair(j, k));
  }
  v.push_back(make_pair(h, w));
  sort(v.begin(), v.end(), cmp);
  long long int dp[n + 1];
  long long int a = v[0].first;
  long long int b = v[0].second;
  long long int c = fac[a + b - 2];
  long long int d = (fac[a - 1] * fac[b - 1]) % 1000000007;
  c = (c * binexpo(d, 1000000005)) % 1000000007;
  dp[0] = c;
  for (i = 1; i <= n; i++) {
    long long int sum = 0;
    for (j = 0; j < i; j++) {
      if (v[j].first <= v[i].first && v[j].second <= v[i].second) {
        a = v[i].first - v[j].first;
        b = v[i].second - v[j].second;
        c = (fac[a + b]);
        d = (fac[a] * fac[b]) % 1000000007;
        c = (c * binexpo(d, 1000000005)) % 1000000007;
        c = (c * dp[j]) % 1000000007;
        sum = (sum + c) % 1000000007;
      }
    }
    a = v[i].first;
    b = v[i].second;
    c = fac[a + b - 2];
    d = (fac[a - 1] * fac[b - 1]) % 1000000007;
    c = (c * binexpo(d, 1000000005)) % 1000000007;
    dp[i] = (c - sum + 1000000007) % 1000000007;
  }
  cout << dp[n];
  return 0;
}
