#include <bits/stdc++.h>
using namespace std;
template <class T>
T gcd(T a, T b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
template <class T>
T lcm(T a, T b) {
  return a * b / gcd(a, b);
}
template <class T>
T absolute(T a) {
  if (a > 0)
    return a;
  else
    return -a;
}
inline long long power(long long base, long long p) {
  long long ans = 1;
  while (p > 0) ans *= base, p -= 1;
  return ans;
}
template <class T>
inline T bigmod(T p, T e, T M) {
  long long ret = 1;
  for (; e > 0; e >>= 1) {
    if (e & 1) ret = (ret * p) % M;
    p = (p * p) % M;
  }
  return (T)ret;
}
template <class T>
inline T modinverse(T a, T M) {
  return bigmod(a, M - 2, M);
}
long long fact[200002], inv[200002];
long long MOD = 1000000007;
void Combinations() {
  fact[0] = 1;
  for (long long i = 1; i < 200002; i++) {
    fact[i] = (i * fact[i - 1]) % MOD;
  }
}
void modInverses() {
  inv[0] = 1;
  for (long long i = 1; i < 200002; i++) {
    inv[i] = (inv[i - 1] * modinverse(i, MOD)) % MOD;
  }
}
long long Calculate(int x, int y) {
  return ((fact[x + y] * inv[x]) % MOD * inv[y]) % MOD;
}
long long path_from_base[2009];
int main() {
  Combinations();
  modInverses();
  int h, w, n;
  pair<int, int> p[2009];
  scanf("%d", &h);
  scanf("%d", &w);
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &p[i].first);
    scanf("%d", &p[i].second);
  }
  sort(p, p + n);
  for (int i = 0; i < n; i++) {
    path_from_base[i] = Calculate(p[i].first - 1, p[i].second - 1);
  }
  long long temp, x, y, exclude = 0;
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j < n; j++) {
      x = p[j].first - p[i].first;
      y = p[j].second - p[i].second;
      if (x > -1 && y > -1) {
        temp = Calculate(x, y);
        path_from_base[j] -= (path_from_base[i] * temp) % MOD;
        while (path_from_base[j] < 0) {
          path_from_base[j] += MOD;
        }
        path_from_base[j] %= MOD;
      }
    }
    exclude +=
        (path_from_base[i] * Calculate(h - p[i].first, w - p[i].second)) % MOD;
    exclude %= MOD;
  }
  long long ans = Calculate(h - 1, w - 1);
  ans -= exclude;
  while (ans < 0) {
    ans += MOD;
  }
  cout << ans % MOD << endl;
  return 0;
}
