#include <bits/stdc++.h>
using namespace std;
struct black_info {
  int r, c, num;
};
int n;
vector<black_info> blacks;
vector<black_info> blacks_in_range(int h, int w) {
  vector<black_info> ans;
  for (auto x : blacks) {
    if (x.r <= h && x.c <= w) {
      ans.push_back(x);
    }
  }
  return ans;
}
namespace mod42 {
int add(int a, int b) { return (a + b) % 1000000007; }
int sub(int a, int b) { return (a + 1000000007 - b) % 1000000007; }
int mul(int a, int b) { return (long long)a * b % 1000000007; }
int extgcd(int a, int b, int& x, int& y) {
  if (a == 0) {
    x = 0;
    y = 1;
    return b;
  }
  int x1, y1;
  int d = extgcd(b % a, a, x1, y1);
  x = y1 - (b / a) * x1;
  y = x1;
  return d;
}
int invmod(int a, int m) {
  int x, y;
  int g = extgcd(a, m, x, y);
  if (g != 1) {
    return -1;
  } else {
    x = (x % m + m) % m;
    return x;
  }
}
vector<int> fac, fnv;
void prepare(int max_n) {
  fac = vector<int>(max_n + 1);
  fnv = vector<int>(max_n + 1);
  fac[0] = 1;
  fnv[0] = 1;
  for (int i = 1; i < max_n + 1; i++) {
    fac[i] = mul(fac[i - 1], i);
    fnv[i] = mul(fnv[i - 1], invmod(i, 1000000007));
  }
}
int c(int total, int choose) {
  if (total < choose) {
    return 0;
  }
  if (choose == 0) {
    return 1;
  }
  return mul(mul(fac[total], fnv[choose]), fnv[total - choose]);
}
}  // namespace mod42
vector<vector<int>> c_cache;
int c(int total, int choose) {
  if (total < choose) {
    return 0;
  }
  if (choose == 0) {
    return 1;
  }
  if (total - choose < choose) {
    return c(total, total - choose);
  }
  if (total < 233 && c_cache[total][choose] >= 0) {
    return c_cache[total][choose];
  }
  int ans = mod42::add(c(total - 1, choose), c(total - 1, choose - 1));
  if (total < 233) {
    ;
    c_cache[total][choose] = ans;
  }
  return ans;
}
vector<int> cache;
int solve(int h, int w, int num) {
  ;
  if (num >= 0 && cache[num] >= 0) {
    ;
    return cache[num];
  }
  vector<black_info> bs = blacks_in_range(h, w);
  int ans = mod42::c(h - 1 + w - 1, h - 1);
  for (auto b : bs) {
    if (b.num == num) {
      continue;
    }
    int to_b = solve(b.r, b.c, b.num);
    int to_target = mod42::c(h - b.r + w - b.c, h - b.r);
    ans = mod42::sub(ans, mod42::mul(to_b, to_target));
  }
  if (num >= 0) {
    cache[num] = ans;
  }
  return ans;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int h, w;
  cin >> h >> w >> n;
  blacks = vector<black_info>(n);
  for (int i = 0; i < n; i++) {
    cin >> blacks[i].r >> blacks[i].c;
    blacks[i].num = i;
  }
  mod42::prepare(h + w);
  c_cache = vector<vector<int>>(233, vector<int>(233, -1));
  cache = vector<int>(n, -1);
  cout << solve(h, w, -1);
}
