// Slower C++ solution:
#include <iostream>

#include <vector>

#include <algorithm>

#include <cmath>

#include <queue>

#include <string>

#include <map>

#include <set>

#include <tuple>

#include <deque>

#include <numeric>

#include <bitset>

#include <iomanip>

#include <cassert>

#include <chrono>

#include <random>

#include <limits>

#include <iterator>

#include <functional>

#include <sstream>

using namespace std;



#define chmax(x, y) x = max(x, y)

#define chmin(x, y) x = min(x, y)



typedef long long ll;

typedef pair<int, int> P;

typedef pair<int, double> Pid;

typedef pair<double, int> Pdi;

const double PI = 3.1415926535897932;   // acos(-1)

const double EPS = 1e-15;

const int INF = 1001001001;

const ll mod = 1e+9 + 7;



#define chadd(x, y) x = (x + y) % mod



ll mod_pow(ll x, int n){

    if(n == 0)      return 1;



    ll res = 1;

    while(n > 0){

        if(n & 1)   res = res * x % mod;

        x = x * x % mod;

        n >>= 1;

    }

    return res;

}



struct Combination{

    int sz;

    vector<ll> fact;

    vector<ll> ifact;



    Combination(int sz = 2 * 1e+5) : sz(sz) {

        fact = vector<ll>(sz + 1);

        ifact = vector<ll>(sz + 1);



        fact[0] = 1;

        for(ll i = 1; i <= sz; ++i){

            fact[i] = fact[i - 1] * i % mod;

        }



        ifact[sz] = mod_pow(fact[sz], mod - 2);

        for(ll i = sz; i > 0; --i){

            ifact[i - 1] = ifact[i] * i % mod;

        }

    }



    ll get_combination(int n, int r){

        if(n < 0 || r < 0 || n < r)     return 0;



        return fact[n] * ifact[r] % mod * ifact[n - r] % mod;

    }

};



ll dp[3005][2];



int main(){

    ios::sync_with_stdio(false);

    cin.tie(nullptr);



    int h, w, n;

    cin >> h >> w >> n;

    vector<P> rc(n);

    for(int i = 0; i < n; ++i){

        int r, c;

        cin >> r >> c;

        --r, --c;

        rc[i] = P(r, c);

    }

    rc.push_back(P(0, 0));      // スタート地点

    rc.push_back(P(h-1, w-1));  // ゴール地点

    sort(rc.begin(), rc.end());

    Combination c;

    

    dp[0][1] = 1;

    // 包徐原理により dp テーブルを埋めていく

    // rc の要素数は n+2 個あり、最初の要素を除いた要素について走査

    // r の昇順に要素を見ていく

    for(int i = 1; i <= n+1; ++i){

        for(int j = 0; j < 2; ++j){

            for(int k = 0; k < i; ++k){     // (r_i, c_i) に到達し得る (r, c) について走査

                // 遷移不能ならば continue

                // r について昇順で並んでいるので、 c を比べて判定

                if(rc[i].second < rc[k].second) continue;



                int N = rc[i].first + rc[i].second - rc[k].first - rc[k].second;

                int K = rc[i].first - rc[k].first;

                // (r_k, c_k) から (r_i, c_i) に到達する経路数

                // j は (0, 1) → (1, 0) と遷移

                ll add = dp[k][j ^ 1] * c.get_combination(N, K) % mod;

                chadd(dp[i][j], add);

            }

        }

    }



    ll res = (dp[n+1][0] - dp[n+1][1]) % mod;

    if(res < 0) res += mod;

    cout << res << endl;

}

// Faster C++ solution for the same problem (measured speedup: 2.936960923213032x):
#include <iostream>

#include <vector>

#include <algorithm>

#include <cmath>

#include <queue>

#include <string>

#include <map>

#include <set>

#include <stack>

#include <tuple>

#include <deque>

#include <numeric>

#include <bitset>

#include <iomanip>

#include <cassert>

#include <chrono>

#include <random>

#include <limits>

#include <iterator>

#include <functional>

#include <sstream>

#include <complex>

using namespace std;



typedef long long ll;

typedef uint64_t ull;

typedef pair<int, int> P;

constexpr double PI = 3.1415926535897932;   // acos(-1)

constexpr double EPS = 1e-9;

constexpr int INF = 1001001001;

constexpr int mod = 1000000007;

// constexpr int mod = 998244353;



#define chmax(x, y) x = max(x, y)

#define chmin(x, y) x = min(x, y)



template<int mod>

struct ModInt{

    int x;



    ModInt() : x(0) {}

    

    ModInt(int64_t y) : x(y >= 0 ? y % mod : (mod - (-y) % mod) % mod) {}

    

    ModInt &operator+=(const ModInt &p){

        if((x += p.x) >= mod)   x -= mod;

        return *this;

    }

    

    ModInt &operator-=(const ModInt &p){

        if((x += mod - p.x) >= mod) x -= mod;

        return *this;

    }



    ModInt &operator*=(const ModInt &p){

        x = (int)(1LL * x * p.x % mod);

        return *this;

    }



    ModInt &operator/=(const ModInt &p){

        *this *= p.inverse();

        return *this;

    }

    

    ModInt operator-() const {return ModInt(-x);}



    ModInt operator+(const ModInt &p) const {return ModInt(*this) += p;}



    ModInt operator-(const ModInt &p) const {return ModInt(*this) -= p;}



    ModInt operator*(const ModInt &p) const {return ModInt(*this) *= p;}



    ModInt operator/(const ModInt &p) const {return ModInt(*this) /= p;}



    bool operator==(const ModInt &p) const {return x == p.x;}



    bool operator!=(const ModInt &p) const {return x != p.x;}



    ModInt inverse() const{

        int a = x, b = mod, u = 1, v = 0, t;

        while(b > 0){

            t = a / b;

            swap(a -= t * b, b);

            swap(u -= t * v, v);

        }

        return ModInt(u);

    }



    ModInt pow(int64_t n) const{

        ModInt ret(1), mul(x);

        while(n > 0){

            if(n & 1)   ret *= mul;

            mul *= mul;

            n >>= 1;

        }

        return ret;

    }



    friend ostream &operator<<(ostream &os, const ModInt &p){

        return os << p.x;

    }



    friend istream &operator>>(istream &is, ModInt &a){

        int64_t t;

        is >> t;

        a = ModInt<mod>(t);

        return (is);

    }



    static int get_mod() {return mod;}

};



using modint = ModInt<mod>;



template<typename T>

struct Combination{

    int sz;

    vector<T> fact_;

    vector<T> ifact_;

    vector<T> inv_;

    

    Combination(int n = 1e+6) : sz(n) {

        fact_.resize(sz + 1);

        ifact_.resize(sz + 1);

        inv_.resize(sz + 1);



        fact_[0] = ifact_[sz] = inv_[0] = 1;

        for(int i = 1; i <= sz; ++i)    fact_[i] = fact_[i - 1] * i;

        ifact_[sz] /= fact_[sz];

        for(int i = sz; i > 0; --i)     ifact_[i - 1] = ifact_[i] * i;

        for(int i = 1; i <= sz; ++i)    inv_[i] = ifact_[i] * fact_[i - 1];

    }



    inline T fact(int k) const  {return fact_[k];}

    inline T ifact(int k) const {return ifact_[k];}

    inline T inv(int k) const   {return inv_[k];}



    T get_permutation(int n, int k){

        if(n < 0 || k < 0 || n < k)     return 0;

        return fact(n) * ifact(n - k);

    }



    T get_combination(int n, int k){

        if(n < 0 || k < 0 || n < k)     return 0;

        return fact(n) * ifact(k) * ifact(n - k);

    }

};



struct Data{

    int r, c;

    Data() = default;

    Data(int r, int c) : r(r), c(c) {}

    bool operator<(const Data& d) const{

        if(r == d.r)    return c < d.c;

        return r < d.r;

    }

    friend ostream& operator<<(ostream& os, const Data& d){

        return os << d.r << ' ' << d.c << '\n';

    }

    friend istream& operator>>(istream& is, Data& d){

        int x, y;

        is >> x >> y;

        d = Data(x, y);

        return is;

    }

};



// dp[i][j] := i 番目の壁を通過する通り数

// j は i 番目を通過するときに、それが偶数回目 (0) か奇数回目 (1) の壁かを表す

// 0 番目はスタート地点

modint dp[3005][2];



int main(){

    ios::sync_with_stdio(false);

    cin.tie(nullptr);



    int h, w, n;

    cin >> h >> w >> n;

    vector<Data> input(n);

    for(int i = 0; i < n; ++i)  cin >> input[i];

    input.push_back(Data(1, 1));

    sort(input.begin(), input.end());

    Combination<modint> comb(h + w + 5);



    dp[0][0] = 1;

    for(int i = 1; i <= n; ++i){

        int nr = input[i].r, nc = input[i].c;

        for(int j = 0; j < i; ++j){

            int r = input[j].r, c = input[j].c;

            if(nc - c < 0)  continue;

            modint route = comb.get_combination(nr - r + nc - c, nr - r);

            for(int k = 0; k < 2; ++k){

                if(dp[j][k] == 0)   continue;

                dp[i][k ^ 1] += dp[j][k] * route;

            }

        }

    }

    

    modint ban = 0;

    for(int i = 1; i <= n; ++i){

        int r = input[i].r, c = input[i].c;

        modint route = comb.get_combination(h - r + w - c, h - r);

        ban -= dp[i][0] * route;

        ban += dp[i][1] * route;

    }



    modint ans = comb.get_combination(h + w - 2, h - 1) - ban;

    cout << ans << endl;

}