#include <bits/stdc++.h>
using namespace std;
int n, m, k;
const long long MOD = 1000000007;
long long fact[220001];
long long x[2000], y[2000], cnt[2000];
long long powmod(long long x, int p) {
  long long res = 1;
  while (p) {
    if (p & 1) res = (res * x) % MOD;
    x = (x * x) % MOD;
    p /= 2;
  }
  return res;
}
long long inv(long long x) { return powmod(x, MOD - 2); }
long long choose(long long n, long long m) {
  long long t = (fact[m] * fact[n - m]) % MOD;
  return (fact[n] * inv(t)) % MOD;
}
long long count(long long x1, long long y1, long long x2, long long y2) {
  if (x1 > x2 || y1 > y2) return 0;
  return choose(x2 - x1 + y2 - y1, x2 - x1) % MOD;
}
long long calc(int i) {
  long long &res = cnt[i];
  if (res != -1) return res;
  res = count(1, 1, x[i], y[i]);
  for (int j = 0; j < k; j++)
    if (i != j) {
      long long between = count(x[j], y[j], x[i], y[i]);
      if (between == 0) continue;
      long long minus = (calc(j) * between) % MOD;
      res = (res - minus + MOD) % MOD;
    }
  return res;
}
int main() {
  fact[0] = 1;
  for (int i = 1; i <= 220000; i++) fact[i] = (fact[i - 1] * i) % MOD;
  cin >> n >> m >> k;
  for (int i = 0; i < k; i++) cin >> x[i] >> y[i];
  memset(cnt, -1, sizeof cnt);
  long long res = choose(n + m - 2, n - 1);
  for (int i = 0; i < k; i++) {
    long long minus = (calc(i) * count(x[i], y[i], n, m)) % MOD;
    res = (res - minus + MOD) % MOD;
  }
  cout << res;
  return 0;
}
