#include <bits/stdc++.h>
using namespace std;
inline long long gcd(long long a, long long b) {
  a = ((a) < 0 ? -(a) : (a));
  b = ((b) < 0 ? -(b) : (b));
  while (b) {
    a = a % b;
    swap(a, b);
  }
  return a;
}
const long long inf = 2147383647;
const long long mod = 1000000007;
const double pi = 2 * acos(0.0);
const double eps = 1e-9;
long long ext_gcd(long long A, long long B, long long *X, long long *Y) {
  long long x2, y2, x1, y1, x, y, r2, r1, q, r;
  x2 = 1;
  y2 = 0;
  x1 = 0;
  y1 = 1;
  for (r2 = A, r1 = B; r1 != 0;
       r2 = r1, r1 = r, x2 = x1, y2 = y1, x1 = x, y1 = y) {
    q = r2 / r1;
    r = r2 % r1;
    x = x2 - (q * x1);
    y = y2 - (q * y1);
  }
  *X = x2;
  *Y = y2;
  return r2;
}
inline long long modInv(long long a, long long m) {
  long long x, y;
  ext_gcd(a, m, &x, &y);
  x %= m;
  if (x < 0) x += m;
  return x;
}
long long dp[2003][2], fact[100000 + 100000 + 8];
int k;
pair<int, int> ar[2003];
vector<int> v[2003];
vector<long long> cost[2003];
long long f(int pos, int prev) {
  long long &res = dp[pos][prev];
  if (res != -1) return res;
  if (pos == k) {
    if (prev & 1) return res = 1;
    return res = mod - 1;
  }
  res = 0;
  long long tmp;
  int x, y;
  for (int i = 0; i < ((long long)(v[pos]).size()); i++) {
    tmp = cost[pos][i];
    tmp = (tmp * f(v[pos][i], prev ^ 1)) % mod;
    res = (res + tmp) % mod;
  }
  return res;
}
int main() {
  fact[0] = 1;
  for (int i = 1; i <= 100000 + 100000; i++) fact[i] = (fact[i - 1] * i) % mod;
  int n, m, x, y;
  long long tmp;
  cin >> n >> m >> k;
  k += 2;
  ar[1].first = ar[1].second = 1;
  ar[k].first = n;
  ar[k].second = m;
  for (int i = 2; i <= k - 1; i++) {
    scanf("%d", &ar[i].first);
    scanf("%d", &ar[i].second);
  }
  sort(ar + 1, ar + k + 1);
  for (int i = 1; i <= k; i++) {
    for (int j = i + 1; j <= k; j++) {
      if (ar[i].second <= ar[j].second) {
        v[i].push_back(j);
        x = ar[j].first - ar[i].first;
        y = ar[j].second - ar[i].second;
        tmp = fact[x + y];
        tmp = (tmp * modInv(((fact[x] * fact[y]) % mod), mod)) % mod;
        cost[i].push_back(tmp);
      }
    }
  }
  memset(dp, -1, sizeof(dp));
  cout << f(1, 0) << "\n";
  return 0;
}
