#include <bits/stdc++.h>
using namespace std;
long long int combi(long long int n, long long int k) {
  long long int ans = 1;
  k = k > n - k ? n - k : k;
  long long int j = 1;
  for (; j <= k; j++, n--) {
    if (n % j == 0) {
      ans *= n / j;
    } else if (ans % j == 0) {
      ans = ans / j * n;
    } else {
      ans = (ans * n) / j;
    }
  }
  return ans;
}
long long int gcd(long long int a, long long int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long int findlcm(vector<long long int> arr, long long int n) {
  long long int ans = arr[0];
  for (long long int i = 1; i < n; i++)
    ans = (((arr[i] * ans)) / (gcd(arr[i], ans)));
  return ans;
}
long long int power(long long int x, long long int y, long long int p) {
  long long int res = 1;
  x = x % p;
  if (x == 0) return 0;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
long long int gcdExtended(long long int a, long long int b, long long int *x,
                          long long int *y);
long long int modInverse(long long int b, long long int m) {
  long long int x, y;
  long long int g = gcdExtended(b, m, &x, &y);
  if (g != 1) return -1;
  return (x % m + m) % m;
}
long long int modDivide(long long int a, long long int b, long long int m) {
  a = a % m;
  long long int inv = modInverse(b, m);
  return (inv * a) % m;
}
long long int gcdExtended(long long int a, long long int b, long long int *x,
                          long long int *y) {
  if (a == 0) {
    *x = 0, *y = 1;
    return b;
  }
  long long int x1, y1;
  long long int gcd = gcdExtended(b % a, a, &x1, &y1);
  *x = y1 - (b / a) * x1;
  *y = x1;
  return gcd;
}
long long int fact[200001];
long long int mod = 1000000007;
void factorial() {
  fact[0] = 1;
  fact[1] = 1;
  for (long long int i = 2; i <= 200000; i++) {
    fact[i] = (fact[i - 1] * i) % mod;
  }
}
bool comp(pair<long long int, long long int> a,
          pair<long long int, long long int> b) {
  if (a.second > b.second)
    return true;
  else if (a.second == b.second)
    return a.first > b.first;
  else
    return false;
}
long long int dp[2000];
bool vis[2000];
vector<pair<long long int, long long int> > vect;
long long int n;
long long int h, w;
long long int solve(long long int j) {
  if (vis[j] == 1) return dp[j];
  vis[j] = 1;
  dp[j] += (modDivide(
      fact[h - vect[j].first + w - vect[j].second],
      (fact[h - vect[j].first] * (fact[w - vect[j].second])) % mod, mod));
  for (long long int i = 0; i < n; i++) {
    if (i != j && vect[i].first >= vect[j].first &&
        vect[i].second >= vect[j].second) {
      dp[j] = (dp[j] -
               (solve(i) * (modDivide((fact[vect[i].first - vect[j].first +
                                            vect[i].second - vect[j].second]),
                                      (fact[vect[i].first - vect[j].first] *
                                       fact[vect[i].second - vect[j].second]) %
                                          mod,
                                      mod))) %
                   mod +
               mod) %
              mod;
    }
  }
  return dp[j];
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  factorial();
  cin >> h >> w >> n;
  long long int x, y;
  for (long long int i = 0; i < n; i++) {
    cin >> x >> y;
    vect.push_back(make_pair(x, y));
  }
  sort(vect.begin(), vect.end(), comp);
  for (long long int i = 0; i < n; i++) {
    dp[i] = 0;
  }
  for (long long int i = 0; i < n; i++) vis[i] = 0;
  for (long long int i = 0; i < n; i++) {
    if (vis[i] == 0) {
      vis[i] = 1;
      dp[i] += (modDivide(
          fact[h - vect[i].first + w - vect[i].second],
          (fact[h - vect[i].first] * (fact[w - vect[i].second])) % mod, mod));
      for (long long int j = 0; j < n; j++) {
        if (j != i && vect[j].first >= vect[i].first &&
            vect[j].second >= vect[i].second) {
          dp[i] =
              (dp[i] -
               (solve(j) * (modDivide((fact[vect[j].first - vect[i].first +
                                            vect[j].second - vect[i].second]),
                                      (fact[vect[j].first - vect[i].first] *
                                       fact[vect[j].second - vect[i].second]) %
                                          mod,
                                      mod))) %
                   mod +
               mod) %
              mod;
        }
      }
    }
  }
  long long int ans = 0;
  for (long long int i = 0; i < n; i++) {
    dp[i] = (dp[i] *
             (modDivide(
                 fact[vect[i].first - 1 + vect[i].second - 1],
                 ((fact[vect[i].first - 1]) * (fact[vect[i].second - 1])) % mod,
                 mod))) %
            mod;
    ans = (ans + dp[i]) % mod;
  }
  long long int total =
      modDivide(fact[h - 1 + w - 1], (fact[h - 1] * fact[w - 1]) % mod, mod);
  ans = (total - ans + mod) % mod;
  cout << ans;
  return 0;
}
