#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const int maxn = 2000;
const int maxh = 1e5 + 0.5;
const long long mod = 1e9 + 7.5;
long long S[2 * maxh + 3], invS[2 * maxh + 3], dp[maxn + 5];
int h, w, n;
struct Pos {
  int x, y;
  bool operator<(const Pos &c) const {
    if (x != c.x) return x < c.x;
    return y < c.y;
  }
} a[maxn + 5];
long long qb(long long a, long long n) {
  long long ans = 1;
  while (n) {
    if (n & 1) ans = ans * a % mod;
    a = a * a % mod;
    n >>= 1;
  }
  return ans;
}
void pre() {
  S[0] = 1;
  invS[0] = 1;
  for (int(i) = 1; (i) <= (2 * maxh); (i)++) {
    S[i] = S[i - 1] * i % mod;
    invS[i] = qb(S[i], mod - 2);
  }
}
long long C(long long n, long long m) {
  if (n < 0 || m < 0) return 0;
  long long ans = S[n + m] * invS[n] % mod * invS[m] % mod;
  return ans;
}
void solve() {
  for (int(i) = 0; (i) < (n + 1); (i)++) {
    dp[i] = C(a[i].x - 1, a[i].y - 1);
    long long sum = 0;
    for (int k = 0; k < i; k++) {
      sum = sum + dp[k] * C(a[i].x - a[k].x, a[i].y - a[k].y) % mod;
    }
    dp[i] = ((dp[i] - sum) % mod + mod) % mod;
  }
  cout << dp[n] << endl;
}
int main() {
  std::ios::sync_with_stdio(false);
  pre();
  while (cin >> h >> w >> n) {
    for (int(i) = 0; (i) < (n); (i)++) cin >> a[i].x >> a[i].y;
    sort(a, a + n);
    a[n].x = h, a[n].y = w;
    solve();
  }
  return 0;
}
