#include <bits/stdc++.h>
using namespace std;
template <class T>
void initvv(vector<vector<T> >& v, int a, int b, const T& t = T()) {
  v.assign(a, vector<T>(b, t));
}
template <class F, class T>
void convert(const F& f, T& t) {
  stringstream ss;
  ss << f;
  ss >> t;
}
static const int INF = 1 << 24;
struct mint {
  long long x;
  mint() : x(0) {}
  mint(long long x) : x((x % 1000000007LL + 1000000007LL) % 1000000007LL) {}
  mint operator+=(const mint& a) {
    if ((x += a.x) >= 1000000007LL) x -= 1000000007LL;
    return *this;
  }
  mint operator-=(const mint& a) {
    if ((x += 1000000007LL - a.x) >= 1000000007LL) x -= 1000000007LL;
    return *this;
  }
  mint operator*=(const mint& a) {
    (x *= a.x) %= 1000000007LL;
    return *this;
  }
  mint operator+(const mint& a) const { return mint(*this) += a; }
  mint operator-(const mint& a) const { return mint(*this) -= a; }
  mint operator*(const mint& a) const { return mint(*this) *= a; }
  bool operator==(const mint& a) const { return x == a.x; }
};
long long powmod(long long x, long long y) {
  long long a = 1;
  while (y) {
    if (y & 1) a = a * x % 1000000007LL;
    x = x * x % 1000000007LL;
    y >>= 1;
  }
  return a;
}
vector<long long> aa(200010);
vector<long long> bb(200010);
long long combi(int a, int b) {
  long long ret = aa[a] * bb[a - b] % 1000000007LL * bb[b] % 1000000007LL;
  return ret;
}
void mainmain() {
  int h, w, n;
  cin >> h >> w >> n;
  for (int(i) = (0); (i) < ((200010)); ++(i)) {
    if (i == 0)
      aa[i] = 1;
    else
      aa[i] = aa[i - 1] * i % 1000000007LL;
    bb[i] = powmod(aa[i], 1000000007LL - 2);
  }
  vector<pair<int, int> > v(n);
  for (int(i) = (0); (i) < ((n)); ++(i)) cin >> v[i].first >> v[i].second;
  sort((v).begin(), (v).end());
  v.push_back(pair<int, int>(h, w));
  for (int(i) = (0); (i) < ((v.size())); ++(i)) {
    v[i].first--;
    v[i].second--;
  }
  n++;
  vector<long long> dp(n);
  for (int(i) = (0); (i) < ((n)); ++(i)) {
    dp[i] = combi(v[i].first + v[i].second, v[i].first);
    for (int(j) = (0); (j) < ((i)); ++(j)) {
      if (v[j].first <= v[i].first && v[j].second <= v[i].second) {
        dp[i] -= dp[j] *
                 combi(v[i].first - v[j].first + v[i].second - v[j].second,
                       v[i].first - v[j].first) %
                 1000000007LL;
      }
    }
    dp[i] = (dp[i] + n * 1000000007LL) % 1000000007LL;
  }
  cout << dp[n - 1] << endl;
}
signed main() {
  ios_base::sync_with_stdio(false);
  cout << fixed << setprecision(20);
  mainmain();
}
