#include <bits/stdc++.h>
const int N = 2e5;
const int p = 1e9 + 7;
using namespace std;
int n, m, k, fac[N + 5], inv[N + 5], ans, f[N + 5];
struct black {
  int x, y;
} a[N + 5];
int C(int n, int m) { return 1ll * fac[n] * inv[n - m] % p * inv[m] % p; }
bool cmp(black a, black b) {
  if (a.x == b.x) return a.y < b.y;
  return a.x < b.x;
}
int main() {
  scanf("%d%d%d", &n, &m, &k);
  fac[0] = 1;
  for (int i = 1; i <= N; i++) fac[i] = 1ll * fac[i - 1] * i % p;
  inv[1] = 1;
  for (int i = 2; i <= N; i++) inv[i] = 1ll * (p - p / i) * inv[p % i] % p;
  inv[0] = 1;
  for (int i = 1; i <= N; i++) inv[i] = 1ll * inv[i - 1] * inv[i] % p;
  ans = C(n + m - 2, n - 1);
  for (int i = 1; i <= k; i++) scanf("%d%d", &a[i].x, &a[i].y);
  sort(a + 1, a + k + 1, cmp);
  for (int i = 1; i <= k; i++) {
    f[i] = C(a[i].x + a[i].y - 2, a[i].x - 1);
    for (int j = 1; j < i; j++)
      if (a[j].x <= a[i].x && a[j].y <= a[i].y)
        f[i] -= 1ll * f[j] *
                C(a[i].x - a[j].x + a[i].y - a[j].y, a[i].x - a[j].x) % p,
            f[i] %= p;
    ans -= 1ll * f[i] * C(n - a[i].x + m - a[i].y, n - a[i].x) % p;
    ans %= p;
  }
  cout << (ans + p) % p << endl;
  return 0;
}
