#include <bits/stdc++.h>
using namespace std;
vector<long long> fact;
vector<long long> rever;
vector<pair<int, int> > black;
long long power(long long base, long long exponent) {
  if (exponent == 1) return base;
  if (exponent % 2 == 0) {
    long long temp = (power(base, exponent / 2)) % 1000000007LL;
    return (temp * temp) % 1000000007LL;
  }
  long long temp = (power(base, exponent / 2)) % 1000000007LL;
  return (((temp * temp) % 1000000007LL) * base) % 1000000007LL;
}
long long combination(long long n, long long m) {
  long long t1 = fact[n + m], t2 = rever[n], t3 = rever[m];
  return (((t1 * t2) % 1000000007LL) * t3) % 1000000007LL;
}
int main() {
  int w, h, n;
  cin >> w >> h >> n;
  long long temp, temp1;
  for (int i = 0; i < n; i++) {
    cin >> temp >> temp1;
    black.push_back(make_pair(temp, temp1));
  }
  black.push_back(make_pair(w, h));
  fact.push_back(1);
  for (int i = 1; i < h + w + 1; i++) {
    fact.push_back((i * fact[i - 1]) % 1000000007LL);
  }
  for (int i = 0; i < h + w + 1; i++)
    rever.push_back(power(fact[i], 1000000007LL - 2LL) % 1000000007LL);
  n++;
  long long boxPath[n];
  sort(black.begin(), black.end());
  boxPath[0] = combination(black[0].first - 1, black[0].second - 1);
  for (int i = 1; i < n; i++) {
    boxPath[i] = combination(black[i].first - 1, black[i].second - 1);
    for (int j = 0; j < i; j++) {
      if (black[j].second > black[i].second || black[j].first > black[i].first)
        continue;
      temp = combination(black[i].first - black[j].first,
                         black[i].second - black[j].second);
      boxPath[i] =
          (boxPath[i] - (boxPath[j] * temp) % 1000000007LL) % 1000000007LL;
    }
  }
  if (boxPath[n - 1] < 0) boxPath[n - 1] += 1000000007LL;
  cout << boxPath[n - 1] << endl;
}
