#include <bits/stdc++.h>
using namespace std;
const int maxn = 2005;
const int mod = 1e9 + 7;
int h, w, n;
struct ppp {
  int x, y;
  int zong;
  long long sum;
  void read() {
    scanf("%d%d", &x, &y);
    sum = 0;
    zong = x + y - 2;
  }
  bool operator<(const ppp& b) const { return (x != b.x) ? x < b.x : y < b.y; }
} node[maxn];
long long A[maxn * 100];
long long invA[maxn * 100];
long long qpow(long long a, long long b) {
  long long ans = 1;
  while (b) {
    if (b & 1) ans = ans * a % mod;
    a = a * a % mod;
    b = b >> 1;
  }
  return ans;
}
void pre() {
  A[0] = 1;
  for (int i = 1; i <= h + w - 2; i++) A[i] = A[i - 1] * i % mod;
  invA[0] = 1;
  for (int i = 1; i <= h + w - 2; i++) invA[i] = qpow(A[i], mod - 2);
}
int main() {
  while (~scanf("%d%d%d", &h, &w, &n)) {
    pre();
    for (int i = 0; i < n; i++) node[i].read();
    sort(node, node + n);
    for (int i = 0; i < n; i++) {
      int xia = node[i].zong;
      long long temp =
          A[xia] * invA[node[i].x - 1] % mod * invA[xia - node[i].x + 1] % mod;
      for (int j = 0; j < i; j++)
        if (node[j].x <= node[i].x && node[j].y <= node[i].y) {
          int now = node[i].zong - node[j].zong;
          int cha = node[i].x - node[j].x;
          temp -= A[now] * invA[cha] % mod * invA[now - cha] % mod *
                  node[j].sum % mod;
          while (temp < 0) temp += mod;
        }
      node[i].sum = temp;
    }
    long long ans =
        A[h + w - 2] * invA[h - 1] % mod * invA[h + w - 2 - h + 1] % mod;
    for (int i = 0; i < n; i++) {
      int now = h + w - 2 - node[i].zong;
      int cha = h - node[i].x;
      ans -=
          node[i].sum * A[now] % mod * invA[cha] % mod * invA[now - cha] % mod;
      while (ans < 0) ans += mod;
    }
    cout << ans << endl;
  }
}
