#include <bits/stdc++.h>
using namespace std;

using i64 = int64_t;

#define rep(i, x, y) for (i64 i = i64(x), i##_max_for_repmacro = i64(y); i < i##_max_for_repmacro; ++i)
#define debug(x) #x << "=" << (x)

#ifdef DEBUG
#define _GLIBCXX_DEBUG
#define print(x) std::cerr << debug(x) << " (L:" << __LINE__ << ")" << std::endl
#else
#define print(x)
#endif

const int inf = 1.01e9;
const i64 inf64 = 4.01e18;
const double eps = 1e-9;

template <typename T, typename U>
ostream &operator<<(ostream &os, const pair<T, U> &p) {
    os << "(" << p.first << ", " << p.second << ")";
    return os;
}

template <typename T>
ostream &operator<<(ostream &os, const vector<T> &vec) {
    os << "[";
    for (const auto &v : vec) {
        os << v << ",";
    }
    os << "]";
    return os;
}

template <typename T>
bool chmin(T &a, const T &b) {
    if (a > b) {
        a = b;
        return true;
    }
    return false;
}

template <typename T>
bool chmax(T &a, const T &b) {
    if (a < b) {
        a = b;
        return true;
    }
    return false;
}

i64 extgcd(i64 a, i64 b, i64 &x, i64 &y) {
    i64 d = a;
    if (b != 0) {
        d = extgcd(b, a % b, y, x);
        y -= (a / b) * x;
    } else {
        x = 1;
        y = 0;
    }
    return d;
}

i64 mod_inverse(i64 a, i64 m) {
    i64 x, y;
    if (extgcd(a, m, x, y) == 1) return (x + m) % m;
    return 0;
}

vector<i64> fact;
void init_fact(i64 n, i64 m) {
    fact.resize(n + 1);
    fact[0] = fact[1] = 1;
    for (i64 i = 2; i <= n; ++i) fact[i] = (i * fact[i - 1]) % m;
}

vector<i64> fact_inv;
void init_fact_inverse(i64 n,i64 m){
    fact_inv.resize(n+1);
    rep(i,0,n+1){
        fact_inv[i]=mod_inverse(fact[i],m);
    }
}

i64 mod_comb(i64 n, i64 k, i64 p) {
    if (n < 0 or k < 0 or n < k) return 0;
    i64 num=fact[n]*fact_inv[n-k]%p,den=fact_inv[k];
    return num * den % p;
}

void solve() {
    const i64 mod = 1'000'000'007;

    const i64 maxhw=200010;
    init_fact(maxhw,mod);
    init_fact_inverse(maxhw,mod);

    i64 H,W,N;
    cin >> H >> W >> N;
    vector<i64> r(N),c(N);
    rep(i,0,N){
        cin >> r[i] >> c[i];
        --r[i];
        --c[i];
    }

    vector<pair<i64,i64>> rc(N);
    rep(i,0,N){
        rc[i]=make_pair(r[i],c[i]);
    }
    sort(begin(rc),end(rc));

    const i64 maxn=3001;
    static i64 dp[maxn][2]; // (今何番目の壁まで見たか, 今までに通過した壁の個数の偶奇) -> 今の壁へ移動する経路の個数
    fill_n((i64*)dp, maxn*2, 0);

    auto count_path = [&](i64 h,i64 w){
        return mod_comb(h+w,h,mod);
    };

    i64 ans=count_path(H-1,W-1);
    rep(i,0,N){
        i64 row=rc[i].first,col=rc[i].second;
        dp[i][1]+=count_path(row,col);
        rep(j,0,i){
            i64 dist_row=row-rc[j].first,dist_col=col-rc[j].second;
            if(dist_row<0 or dist_col<0) continue;
            rep(k,0,2){
                dp[i][(k+1)%2]+=dp[j][k]*count_path(dist_row,dist_col)%mod;
                dp[i][(k+1)%2]%=mod;
            }
        }

        // i番目の壁でfinish
        ans+=dp[i][0]*count_path((H-1)-row,(W-1)-col)%mod;
        ans%=mod;

        ans-=dp[i][1]*count_path((H-1)-row,(W-1)-col)%mod;
        ans%=mod;
        ans+=mod;
        ans%=mod;
    }

    cout << ans << endl;
}

int main() {
    std::cin.tie(0);
    std::ios::sync_with_stdio(false);
    cout.setf(ios::fixed);
    cout.precision(16);
    solve();
    return 0;
}


Measured memory_bytes: 3584