#include <bits/stdc++.h>
using namespace std;
string to_string(string s) { return '"' + s + '"'; }
string to_string(const char* s) { return to_string((string)s); }
template <typename A, typename B>
string to_string(pair<A, B> p) {
  return "(" + to_string(p.first) + ", " + to_string(p.second) + ")";
}
template <typename A>
string to_string(A v) {
  bool first = true;
  string res = "{";
  for (const auto& x : v) {
    if (!first) {
      res += ", ";
    }
    first = false;
    res += to_string(x);
  }
  res += "}";
  return res;
}
void debug_out() { cerr << endl; }
template <typename Head, typename... Tail>
void debug_out(Head H, Tail... T) {
  cerr << " " << to_string(H);
  debug_out(T...);
}
const int N = 2e5 + 9;
long long fact[N], ans[N], ifact[N];
pair<int, int> p[2007];
long long power(long long a, int b) {
  long long x = 1;
  while (b) {
    if (b & 1) x = x * a % 1000000007;
    a = a * a % 1000000007;
    b /= 2;
  }
  return x;
}
long long f(int x1, int y1, int x2, int y2) {
  if (x1 > x2 || y1 > y2) return 0;
  int dx = x2 - x1, dy = y2 - y1;
  return fact[dx + dy] * ifact[dx] % 1000000007 * ifact[dy] % 1000000007;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  fact[0] = ifact[0] = 1;
  for (int i = 1; i < N; i++) {
    fact[i] = fact[i - 1] * i % 1000000007;
    ifact[i] = power(fact[i], 1000000007 - 2);
  }
  int tt = 1;
  while (tt--) {
    int n, m, k;
    cin >> n >> m >> k;
    for (int i = 0; i < k; i++) {
      cin >> p[i].first >> p[i].second;
    }
    p[k] = {n, m};
    k++;
    sort(p, p + k);
    for (int i = 0; i < k; i++) {
      ans[i] = f(1, 1, p[i].first, p[i].second);
    }
    for (int i = 0; i < k - 1; i++) {
      for (int j = i + 1; j < k; j++) {
        ans[j] = (ans[j] -
                  ans[i] * f(p[i].first, p[i].second, p[j].first, p[j].second) %
                      1000000007 +
                  1000000007) %
                 1000000007;
      }
    }
    cout << ans[k - 1] << endl;
  }
  return 0;
}
