#include <bits/stdc++.h>
using namespace std;
const int Mod = 1000000007, MAXL = 100006;
int h, w, n;
long long f[MAXL][2], fac[MAXL << 1], antifac[MAXL << 1];
vector<pair<int, int> > p;
long long qpow(long long a, int first) {
  long long ret = 1;
  while (first) {
    if (first & 1) ret = ret * a % Mod;
    a = a * a % Mod;
    first >>= 1;
  }
  return ret;
}
void ready() {
  fac[0] = fac[1] = antifac[0] = antifac[1] = 1;
  for (int i = 2; i <= h + w; ++i) {
    fac[i] = fac[i - 1] * i % Mod;
    antifac[i] = qpow(fac[i], Mod - 2);
  }
}
long long comb(int n, int m) {
  return (fac[n] * antifac[m] % Mod) * antifac[n - m] % Mod;
}
int main() {
  scanf("%d%d%d", &h, &w, &n);
  ready();
  for (int i = 0, a, b; i < n; ++i) {
    scanf("%d%d", &a, &b);
    p.push_back(make_pair(a, b));
  }
  p.push_back(make_pair(1, 1));
  p.push_back(make_pair(h, w));
  sort(p.begin(), p.end());
  n += 2;
  f[0][1] = 1;
  f[0][0] = 0;
  for (int i = 1; i < n; ++i) {
    f[i][0] = f[i][1] = 0;
    for (int j = 0; j < i; ++j)
      if (p[j].first <= p[i].first && p[j].second <= p[i].second)
        for (int k = 0; k < 2; ++k)
          f[i][k] = (f[i][k] + f[j][1 - k] *
                                   comb(p[i].first - p[j].first + p[i].second -
                                            p[j].second,
                                        p[i].first - p[j].first) %
                                   Mod) %
                    Mod;
  }
  printf("%d\n", (f[n - 1][0] - f[n - 1][1] + Mod) % Mod);
}
