#include <bits/stdc++.h>
using namespace std;
const int MaxN = 200005;
const long long Mod = 1000000007;
int n, m, k;
pair<int, int> a[MaxN];
long long dp[MaxN];
long long fct[MaxN], ifct[MaxN];
long long Power(long long a, long long b) {
  long long Resuft = 1;
  while (b) {
    if (b & 1) {
      Resuft = Resuft * a % Mod;
    }
    b /= 2;
    a = a * a % Mod;
  }
  return Resuft;
}
void Init() {
  fct[0] = 1;
  for (int i = 1; i < MaxN; i++) {
    fct[i] = (fct[i - 1] * i) % Mod;
  }
  ifct[MaxN - 1] = Power(fct[MaxN - 1], Mod - 2);
  for (int i = MaxN - 2; i >= 0; i--) {
    ifct[i] = (ifct[i + 1] * (i + 1)) % Mod;
  }
}
long long C(int n, int k) {
  return (((fct[n] * ifct[k]) % Mod) * ifct[n - k]) % Mod;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m >> k;
  for (int i = 0; i < k; i++) {
    cin >> a[i].first >> a[i].second;
  }
  a[k] = make_pair(n, m);
  sort(a, a + k + 1);
  Init();
  for (int i = 0; i <= k; i++) {
    dp[i] = C(a[i].first + a[i].second - 2, a[i].first - 1);
    for (int j = 0; j < i; j++) {
      if (a[j].first <= a[i].first && a[j].second <= a[i].second) {
        dp[i] = (dp[i] -
                 dp[j] * C(a[i].first + a[i].second - a[j].first - a[j].second,
                           a[i].first - a[j].first) +
                 Mod * Mod) %
                Mod;
      }
    }
  }
  cout << dp[k];
  return 0;
}
