#include <bits/stdc++.h>
using namespace std;
const int MAX = 200005;
const int mod = 1000000007;
struct info {
  int x, y;
} arr[MAX];
bool cmp(info aa, info bb) {
  if (aa.x == bb.x) return aa.y < bb.y;
  return aa.x < bb.x;
}
long long fact[MAX], invFact[MAX], ans[MAX];
long long power(long long b, long long p) {
  long long ans = 1 % mod;
  b %= mod;
  while (p) {
    if (p & 1) ans = (ans * b) % mod;
    b = (b * b) % mod;
    p >>= 1;
  }
  return ans;
}
void cal() {
  fact[0] = 1;
  for (int i = 1; i < MAX; i++) fact[i] = (fact[i - 1] * i) % mod;
  for (int i = 0; i < MAX; i++) invFact[i] = power(fact[i], mod - 2);
}
long long nCr(int n, int r) {
  if (r < 0) return 0;
  return (((fact[n] * invFact[r]) % mod) * invFact[n - r]) % mod;
}
int main() {
  cal();
  int h, w, n;
  scanf("%d %d %d", &h, &w, &n);
  for (int i = 0; i < n; i++) scanf("%d %d", &arr[i].x, &arr[i].y);
  arr[n].x = h, arr[n].y = w;
  sort(arr, arr + n + 1, cmp);
  for (int i = 0; i <= n; i++) {
    int a = arr[i].x - 1 + arr[i].y - 1;
    int b = arr[i].y - 1;
    ans[i] = nCr(a, b);
    for (int j = 0; j < i; j++) {
      a = arr[i].x - arr[j].x + arr[i].y - arr[j].y;
      b = arr[i].y - arr[j].y;
      ans[i] -= (nCr(a, b) * ans[j]) % mod;
      if (ans[i] < 0) ans[i] += mod;
    }
  }
  if (ans[n] < 0) ans[n] += mod;
  printf("%lld\n", ans[n]);
}
