#include <bits/stdc++.h>
using namespace std;
pair<int, int> a[2005];
long long int p = 1000000007;
long long int ans[2005], fact[200005], invfact[200005];
int th, tw;
long long int powe(long long int a, long long int b) {
  if (b == 0) return 1;
  long long int ans = 1;
  if (b % 2 == 1) {
    ans *= a;
  }
  long long int temp = powe(a, b / 2);
  temp *= temp;
  temp %= p;
  ans *= temp;
  ans %= p;
  return ans;
}
long long int inv(long long int a) { return powe(a, p - 2); }
long long int ways(int a, int b, int c, int d) {
  if (a > c || b > d) return 0;
  int temp = c + d - a - b;
  int chose = c - a;
  long long int ret = fact[temp];
  ret *= invfact[chose];
  ret %= p;
  ret *= invfact[temp - chose];
  ret %= p;
  return ret;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  fact[0] = 1;
  invfact[0] = inv(fact[0]);
  for (__typeof(200005) i = (1) - ((1) > (200005));
       i != (200005) - ((1) > (200005)); i += 1 - 2 * ((1) > (200005))) {
    fact[i] = fact[i - 1] * 1LL * i;
    fact[i] %= p;
    invfact[i] = inv(fact[i]);
  }
  int h, w, n;
  cin >> h >> w >> n;
  for (__typeof(n) i = (0) - ((0) > (n)); i != (n) - ((0) > (n));
       i += 1 - 2 * ((0) > (n))) {
    cin >> a[i].first >> a[i].second;
  }
  sort(a, a + n);
  a[n].first = h;
  a[n].second = w;
  for (__typeof(n + 1) i = (0) - ((0) > (n + 1));
       i != (n + 1) - ((0) > (n + 1)); i += 1 - 2 * ((0) > (n + 1))) {
    ans[i] += ways(1, 1, a[i].first, a[i].second);
    ans[i] %= p;
    for (__typeof(0) j = (i) - ((i) > (0)); j != (0) - ((i) > (0));
         j += 1 - 2 * ((i) > (0))) {
      long long int temp =
          ans[j] * ways(a[j].first, a[j].second, a[i].first, a[i].second);
      temp %= p;
      ans[i] -= temp;
      ans[i] += p;
      ans[i] %= p;
    }
  }
  cout << ans[n] << "\n";
  return 0;
}
