#include <bits/stdc++.h>
using namespace std;
int n, t, dp[2][2005], ans, s[200005], f[200005], A, B;
const int M = 1e9 + 7;
struct P {
  int x, y;
  bool operator<(const P &t) const { return x + y < t.x + t.y; }
} a[2005];
long long sv(int x, int y) { return 1ll * s[x + y] * f[x] % M * f[y] % M; }
bool ck(int &x) {
  if (x >= M) x -= M;
}
int main() {
  scanf("%d %d %d", &A, &B, &n);
  s[0] = f[0] = 1;
  int T = M - 2;
  for (int i = 1; i <= A + B; ++i) {
    s[i] = 1ll * s[i - 1] * i % M;
    int w = s[i];
    f[i] = 1;
    for (int o = 1; o <= T; o <<= 1) {
      if (o & T) f[i] = 1ll * f[i] * w % M;
      w = 1ll * w * w % M;
    }
  }
  a[0].x = a[0].y = 1;
  for (int i = 1; i <= n; ++i) {
    scanf("%d %d", &a[i].x, &a[i].y);
  }
  sort(a + 1, a + n + 1);
  n++;
  a[n].x = A;
  a[n].y = B;
  dp[0][0] = 1;
  for (int i = 0; i <= n; ++i) {
    for (int o = 0; o <= n; ++o) {
      if ((a[o].x == a[i].x && a[o].y == a[i].y) || a[o].x < a[i].x ||
          a[o].y < a[i].y)
        continue;
      long long s = sv(a[o].x - a[i].x, a[o].y - a[i].y);
      dp[1][o] += 1ll * dp[0][i] * s % M;
      ck(dp[1][o]);
      dp[0][o] += 1ll * dp[1][i] * s % M;
      ck(dp[0][o]);
    }
  }
  printf("%d\n", (dp[1][n] - dp[0][n] + M) % M);
}
