#include <bits/stdc++.h>
using namespace std;
const int N = (int)2e5 + 5;
const int K = 26;
const int M = 2002;
const long long inf = (long long)1e9 + 7;
struct cell {
  int x, y;
  cell() {}
  cell(int x, int y) : x(x), y(y) {}
  bool operator<(const cell& a) const {
    if (a.x == x) {
      return y < a.y;
    } else {
      return x < a.x;
    }
  }
};
cell a[M];
long long dp[M][2];
long long f[N], fn[N];
long long pw(long long a, long long k) {
  if (k == 0) {
    return 1;
  }
  if (k % 2 == 1) {
    return (a * pw(a, k - 1)) % inf;
  }
  long long t = pw(a, k / 2);
  return (t * t) % inf;
}
long long cw(int n, int k) { return ((f[n] * fn[k]) % inf * fn[n - k]) % inf; }
int main() {
  int h, w, n;
  scanf("%d%d%d", &h, &w, &n);
  f[0] = 1;
  fn[0] = 1;
  for (int i = 1; i < N; ++i) {
    f[i] = (f[i - 1] * i) % inf;
    fn[i] = pw(f[i], inf - 2);
  }
  for (int i = 0; i < n; ++i) {
    scanf("%d%d", &a[i].x, &a[i].y);
    --a[i].x, --a[i].y;
  }
  sort(a, a + n);
  long long ans = cw(h + w - 2, h - 1);
  long long s = 0, t = 0;
  for (int i = 0; i < n; ++i) {
    dp[i][0] = cw(a[i].x + a[i].y, a[i].x);
    for (int j = 0; j < i; ++j) {
      if (a[i].x >= a[j].x && a[i].y >= a[j].y) {
        dp[i][1] += (dp[j][0] *
                     cw(a[i].x - a[j].x + a[i].y - a[j].y, a[i].x - a[j].x)) %
                    inf;
        dp[i][0] += (dp[j][1] *
                     cw(a[i].x - a[j].x + a[i].y - a[j].y, a[i].x - a[j].x)) %
                    inf;
        dp[i][1] %= inf, dp[i][0] %= inf;
      }
    }
    s += (dp[i][0] * cw(h + w - 2 - a[i].x - a[i].y, h - 1 - a[i].x)) % inf,
        t += (dp[i][1] * cw(h + w - 2 - a[i].x - a[i].y, h - 1 - a[i].x)) % inf;
    s %= inf, t %= inf;
  }
  ans -= (s - t);
  ans += 2 * inf;
  ans %= inf;
  printf("%lld", ans);
  return 0;
}
