#include <bits/stdc++.h>
using namespace std;
long long rdtsc() {
  long long tmp;
  asm("rdtsc" : "=A"(tmp));
  return tmp;
}
inline int myrand() { return abs((rand() << 15) ^ rand()); }
inline int rnd(int x) { return myrand() % x; }
const int INF = (int)1e9 + 1;
const long double EPS = 1e-9;
const int MOD = (int)1e9 + 7;
void add(int &x, int y) {
  if ((x += y) >= MOD) {
    x -= MOD;
  }
}
int mult(int x, int y) { return (long long)x * y % MOD; }
int myPower(int x, int pw) {
  int res = 1;
  for (; pw; pw >>= 1) {
    if (pw & 1) {
      res = mult(res, x);
    }
    x = mult(x, x);
  }
  return res;
}
const int maxx = (int)2e5 + 10;
int fact[maxx], invfact[maxx];
void precalc() {
  fact[0] = invfact[0] = 1;
  for (int i = 1; i < maxx; ++i) {
    fact[i] = mult(fact[i - 1], i);
    invfact[i] = mult(invfact[i - 1], myPower(i, MOD - 2));
  }
}
const int maxn = (int)2e3 + 10;
int w, h, n;
pair<int, int> xs[maxn];
bool read() {
  if (scanf("%d%d%d", &w, &h, &n) < 2) {
    return 0;
  }
  for (int i = 0; i < n; ++i) {
    scanf("%d%d", &xs[i].first, &xs[i].second);
  }
  return 1;
}
int d[maxn];
int getC(int n, int k) {
  return mult(fact[n], mult(invfact[k], invfact[n - k]));
}
int getf(const pair<int, int> &a, const pair<int, int> &b) {
  int x = b.first - a.first;
  int y = b.second - a.second;
  if (x < 0 || y < 0) {
    return 0;
  }
  return getC(x + y, x);
}
void solve() {
  xs[n++] = make_pair(1, 1);
  xs[n++] = make_pair(w, h);
  sort(xs, xs + n);
  d[0] = 1;
  for (int i = 1; i < n; ++i) {
    d[i] = getf(xs[0], xs[i]);
    for (int j = 1; j < i; ++j) {
      if (xs[j].second <= xs[i].second) {
        add(d[i], MOD - mult(d[j], getf(xs[j], xs[i])));
      }
    }
  }
  printf("%d\n", d[n - 1]);
}
int main() {
  srand(rdtsc());
  precalc();
  while (1) {
    if (!read()) {
      break;
    }
    solve();
  }
  return 0;
}
