#include <bits/stdc++.h>
using namespace std;
const long long maxn = 2e5 + 5;
const long long mod = 1e9 + 7;
long long comb[maxn];
long long quick_pow(long long x, long long y, long long mod) {
  long long ans = 1;
  while (y) {
    if (y & 1) ans = (ans * x) % mod;
    x = (x * x) % mod;
    y >>= 1;
  }
  return ans;
}
void init() {
  comb[0] = comb[1] = 1;
  for (int i = 2; i < maxn; i++) comb[i] = (comb[i - 1] * i) % mod;
}
long long X[maxn], Y[maxn];
struct Point {
  long long x, y;
  long long w;
  bool operator<(const Point& a) const {
    if (x == a.x) return y < a.y;
    return x < a.x;
  }
};
Point p[maxn];
int main() {
  long long h, w, n;
  cin.sync_with_stdio(false);
  cout.sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  init();
  while (cin >> h >> w >> n) {
    long long m = min(h, w);
    long long ans = ((comb[h + w - 2] * quick_pow(comb[w - 1], mod - 2, mod)) %
                     mod * quick_pow(comb[h - 1], mod - 2, mod)) %
                    mod;
    ;
    for (long long i = 0; i < n; i++) cin >> p[i].x >> p[i].y;
    sort(p, p + n);
    long long res = 0;
    for (long long i = 0; i < n; i++) {
      long long dx = min(p[i].x, p[i].y);
      long long dy = max(p[i].x, p[i].y);
      p[i].w = ((comb[dx + dy - 2] * quick_pow(comb[dx - 1], mod - 2, mod)) %
                mod * quick_pow(comb[dy - 1], mod - 2, mod)) %
               mod;
      long long now = 0;
      for (long long j = 0; j < i; j++) {
        if (p[j].y <= p[i].y) {
          long long x = min(p[i].x - p[j].x + 1, p[i].y - p[j].y + 1);
          long long y = max(p[i].x - p[j].x + 1, p[i].y - p[j].y + 1);
          long long mm =
              ((comb[x + y - 2] * quick_pow(comb[x - 1], mod - 2, mod)) % mod *
               quick_pow(comb[y - 1], mod - 2, mod) % mod);
          p[i].w = ((p[i].w - ((p[j].w * mm) % mod)) % mod + mod) % mod;
        }
      }
      dx = min(h - p[i].x + 1, w - p[i].y + 1);
      dy = max(h - p[i].x + 1, w - p[i].y + 1);
      now = ((comb[dx + dy - 2] * quick_pow(comb[dx - 1], mod - 2, mod)) % mod *
             quick_pow(comb[dy - 1], mod - 2, mod)) %
            mod;
      res = (res + now * p[i].w % mod) % mod;
    }
    cout << ((ans - res) % mod + mod) % mod << endl;
  }
  return 0;
}
