#include <bits/stdc++.h>
using namespace std;
const int MAXN = (int)2e5 + 10, MOD = (int)1e9 + 7;
pair<int, int> p[MAXN];
int n, m, k, f[MAXN], fac[MAXN], Ifac[MAXN], Tohka;
int Pow(int a, int b) {
  int d = 1;
  for (; b; d = (b & 1) ? (long long)d * a % MOD : d,
            a = (long long)a * a % MOD, b /= 2)
    ;
  return d;
}
int C(int n, int k) {
  if (n < k) return 0;
  return (long long)fac[n] * Ifac[k] % MOD * Ifac[n - k] % MOD;
}
int F(int first, int second) {
  if (first < 1 || second < 1) return 0;
  return C(first + second - 2, first - 1);
}
int main() {
  scanf("%d%d%d", &n, &m, &k);
  fac[0] = 1;
  for (int i = 1; i <= n + m; ++i) fac[i] = (long long)fac[i - 1] * i % MOD;
  Ifac[n + m] = Pow(fac[n + m], MOD - 2);
  for (int i = n + m - 1; i >= 0; --i)
    Ifac[i] = (long long)Ifac[i + 1] * (i + 1) % MOD;
  for (int i = 1; i <= k; ++i) scanf("%d%d", &p[i].first, &p[i].second);
  sort(p + 1, p + k + 1);
  Tohka = F(n, m);
  for (int i = k; i >= 1; --i) {
    f[i] = MOD - F(n - p[i].first + 1, m - p[i].second + 1);
    for (int j = i + 1; j <= k; ++j)
      f[i] = (f[i] -
              ((long long)F(p[j].first - p[i].first + 1,
                            p[j].second - p[i].second + 1) *
               f[j] % MOD) +
              MOD) %
             MOD;
    Tohka =
        ((long long)Tohka + (long long)f[i] * F(p[i].first, p[i].second)) % MOD;
  }
  cout << Tohka << endl;
  fclose(stdin);
  fclose(stdout);
  return 0;
}
