#include <bits/stdc++.h>
using namespace std;
const long long INF = 1000000007LL;
const int NMax = 210000;
const int MMax = 2100;
int N, M, Q;
long long POW(long long a, long long b) {
  long long ret = 1, tmp = a;
  while (b) {
    if (b & 1) {
      ret = (ret * tmp) % INF;
      --b;
    }
    tmp = (tmp * tmp) % INF;
    b >>= 1;
  }
  return ret;
}
long long FAC[NMax];
struct pii {
  int x, y;
};
pii mp(int x, int y) {
  pii ret;
  ret.x = x;
  ret.y = y;
  return ret;
}
pii A[MMax];
bool cmp(pii a, pii b) { return a.x <= b.x && a.y <= b.y; }
int indeg[MMax];
vector<int> G[MMax];
int Q1[MMax];
long long dp[MMax];
long long inv[NMax];
long long C(int a, int b) { return FAC[a] * inv[b] % INF * inv[a - b] % INF; }
int main() {
  FAC[0] = 1;
  inv[0] = 1;
  scanf("%d%d%d", &N, &M, &Q);
  for (int i = 1; i <= N + M; i++)
    FAC[i] = (FAC[i - 1] * (long long)i) % INF, inv[i] = POW(FAC[i], INF - 2);
  long long ret = FAC[N + M - 2] * POW(FAC[N - 1], INF - 2) % INF *
                  POW(FAC[M - 1], INF - 2) % INF;
  for (int i = 1; i <= Q; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    A[i] = mp(x, y);
  }
  for (int i = 1; i <= Q; i++) {
    for (int j = 1; j <= Q; j++)
      if (j != i && cmp(A[j], A[i])) {
        indeg[i]++;
        G[j].push_back(i);
      }
  }
  int bot = 0;
  for (int i = 1; i <= Q; i++)
    if (!indeg[i]) Q1[bot++] = i;
  for (int i = 0; i < bot; i++) {
    int x = Q1[i];
    for (int j = 0; j < G[x].size(); j++) {
      indeg[G[x][j]]--;
      if (indeg[G[x][j]] == 0) Q1[bot++] = G[x][j];
    }
  }
  for (int i = 0; i < Q; i++) {
    pii tmp = A[Q1[i]];
    dp[i] = (-C(tmp.x + tmp.y - 2, tmp.x - 1) + INF) % INF;
    for (int j = 0; j < i; j++)
      if (cmp(A[Q1[j]], A[Q1[i]])) {
        pii tmq = A[Q1[j]];
        dp[i] = (dp[i] -
                 dp[j] * C(tmp.x - tmq.x + tmp.y - tmq.y, tmp.x - tmq.x) % INF +
                 INF) %
                INF;
      }
    ret = (ret + dp[i] * C(N - tmp.x + M - tmp.y, N - tmp.x) % INF) % INF;
  }
  printf("%I64d\n", ret);
  getchar();
  getchar();
  return 0;
}
