#include <bits/stdc++.h>
using namespace std;
long long a[2005];
long long mul[200005];
long long niyuan[200005];
void multi(int n) {
  mul[0] = 1;
  for (int i = 1; i <= n; i++) {
    mul[i] = mul[i - 1] * i % 1000000007;
  }
}
long long quick(long long x, int n) {
  long long ans = 1;
  while (n > 0) {
    if (n % 2) {
      ans = ans * x % 1000000007;
    }
    n /= 2;
    x = x * x % 1000000007;
  }
  return ans;
}
void ni(int n) {
  niyuan[n] = quick(mul[n], 1000000007 - 2);
  for (int i = n - 1; i >= 0; i--)
    niyuan[i] = niyuan[i + 1] * (i + 1) * 1L % 1000000007;
}
long long c(int m, int n) {
  if (m < n) return 0;
  return mul[m] * niyuan[n] % 1000000007 * niyuan[m - n] % 1000000007;
}
struct node {
  int x, y;
  friend bool operator<(node a, node b) {
    if (a.x != b.x)
      return a.x < b.x;
    else
      return a.y < b.y;
  }
} T[2005];
int main() {
  int n, m, N;
  scanf("%d%d%d", &n, &m, &N);
  int M;
  if (n > m)
    M = n;
  else
    M = m;
  multi(2 * M);
  ni(2 * M);
  for (int i = 1; i <= N; i++) {
    scanf("%d%d", &T[i].x, &T[i].y);
  }
  N++;
  T[N].x = n, T[N].y = m;
  sort(T + 1, T + N + 1);
  for (int i = 1; i <= N; i++) {
    a[i] = c(T[i].x + T[i].y - 2, T[i].y - 1);
    for (int j = 1; j <= i - 1; j++) {
      a[i] = ((a[i] -
               a[j] * c(T[i].x + T[i].y - T[j].x - T[j].y, T[i].x - T[j].x) %
                   1000000007) %
                  1000000007 +
              1000000007) %
             1000000007;
    }
  }
  printf("%lld\n", a[N]);
  return 0;
}
