#include <bits/stdc++.h>
using namespace std;
long long const mod = 1e9 + 7;
long long const MAXN = 2e5 + 5;
struct Node {
  long long x, y;
} a[MAXN];
long long f[MAXN];
long long frac[MAXN], invfrac[MAXN], inv[MAXN];
void Init(long long Max) {
  frac[0] = invfrac[0] = 1;
  frac[1] = invfrac[1] = inv[1] = 1;
  for (register long long i = 2; i <= Max; ++i) {
    frac[i] = frac[i - 1] * i % mod;
    inv[i] = (mod - mod / i) * inv[mod % i] % mod;
    invfrac[i] = invfrac[i - 1] * inv[i] % mod;
  }
}
long long C(long long n, long long m) {
  return frac[n] * invfrac[m] % mod * invfrac[n - m] % mod;
}
signed main() {
  Init(2e5);
  long long h, w, n;
  cin >> h >> w >> n;
  for (register long long i = 1; i <= n; ++i) cin >> a[i].x >> a[i].y;
  ++n, a[n].x = 1, a[n].y = 1;
  ++n, a[n].x = h, a[n].y = w;
  sort(a + 1, a + 1 + n,
       [](Node x, Node y) { return x.x ^ y.x ? x.x < y.x : x.y < y.y; });
  f[1] = mod - 1;
  for (register long long i = 2; i <= n; ++i)
    for (register long long j = 1; j < i; ++j)
      if (a[i].x >= a[j].x && a[i].y >= a[j].y)
        (f[i] += (mod - 1) * f[j] % mod *
                 C(a[i].x - a[j].x + a[i].y - a[j].y, a[i].x - a[j].x) % mod) %=
            mod;
  cout << f[n] << endl;
  return 0;
}
