#include <bits/stdc++.h>

using namespace std;

/* g++ -g -fsanitize=address -lasan -std=c++11 -Dfoo_ */

/* freopen("input.txt", "rt", stdin); */
/* freopen("output.txt", "wt", stdout); */

#define ALL(c)          (c).begin(), (c).end()
#define ALLR(c)         (c).rbegin(), (c).rend()
#define FOR(i,a,b)      for (int i=(a); i < (b); ++i)
#define FORR(i,a,b)     for (int i=(a); i > (b); --i)
#define FOR_ALL(i,c)    for (__typeof((c).begin()) i=(c).begin();   \
                             i != (c).end(); ++i)
#define FOR_ALLR(i,c)   for (__typeof((c).rbegin()) i=(c).rbegin(); \
                             i != (c).rend(); ++i)
#define SZ(array)       (sizeof(array)/sizeof(array[0]))
#define lc(x)           (x<<1)     /* 2*x */
#define rc(x)           (x<<1 | 1) /* 2*x+1 */
#define lowbit(x)       (x & (-x)) /* 0b10100 -> 0b100 */

typedef long long       LL;
typedef map<int,int>    MII;
typedef pair<int,int>   PII;
typedef set<int>        SI;
typedef vector<bool>    VB;
typedef vector<double>  VD;
typedef vector<int>     VI;
typedef vector<string>  VS;

/* check if a key is in container C */
template <class C>
inline bool in_(const typename C::key_type& k, const C& A)
{ return A.find(k) != A.end(); }
inline bool in_(const string& s, const string& S)
{ return S.find(s) != string::npos; }

/* http://codeforces.com/blog/entry/16099 */
/*
 * The number of ways to reach (x2,y2) from (x1,y1)
 * if x2 >= x1 and y2 >= y1:
 * Let x = x2-x1 and y = y2-y1
 * Number of ways F(x1,y1,x2,y2) = (x+y)!/(x!y!)
 *
 * => F = C(x,x+y)
 *
 * If cell at (i,j) is blocked, all cells with their respective
 * coordinates greater than or equal to i and j will be affected by it.
 *
 * Let's say our set S = {all blocked cells + cell(N,M)}. Sort S on
 * increasing basis of x coordinate and then increasing on y. Maintain
 * an array ans where ans[i] denotes number of ways to reach cell at
 * index i in sorted(S).
 *
 * Initially ans[i] = F(1,1,S[i].x,S[i].y).
 *
 * For each pair i,j, if point j is effected by the block point at i:
 *
 * ans[j] -= ans[i]*F(xi,yi,xj,yj)
 *
 * => the number of ways go through i to j
 */

const int mod = 1e9+7;
const int maxf = 2e5+5;
int fac[maxf];

int mul(const int a, const int b)
{ return 1LL * a * b % mod; }

int pw(const int a, const int k)
{
    if (k == 0)
        return 1;
    int x = pw(a,k/2); x = mul(x,x);
    return k&1 ? mul(x,a) : x;
}

int inverse(const int a, const int p)
{ return pw(a,p-2); }

int F(const int x1, const int y1, const int x2, const int y2)
{
    const int x = x2-x1;
    const int y = y2-y1;
    return mul(fac[x+y], inverse(mul(fac[x],fac[y]),mod));
}

int main()
{
#ifdef foo_
    freopen("foo", "rt", stdin);
#endif
    ios::sync_with_stdio(false);
    fac[0] = 1;
    FOR(i,1,maxf)
        fac[i] = 1LL * fac[i-1] * i % mod;
    int h,w,n;
    while (cin >> h >> w >> n) {
        vector<PII> A(n+1);
        FOR(i,0,n)
            cin >> A[i].first >> A[i].second;
        A[n] = PII(h,w);        /* the target cell */
        sort(ALL(A));
        VI ans(n+1);
        FOR(i,0,n+1)
            ans[i] = F(1,1,A[i].first,A[i].second);
        FOR(i,0,n+1) FOR(j,i+1,n+1) {
            const int x1 = A[i].first;
            const int y1 = A[i].second;
            const int x2 = A[j].first;
            const int y2 = A[j].second;
            if (x1 <= x2 && y1 <= y2) {
                ans[j] -= mul(ans[i], F(x1,y1,x2,y2));
                ans[j] %= mod;
            }
        }
        ans[n] += mod;
        ans[n] %= mod;
        cout << ans[n] << endl;
    }
    return 0;
}


Measured memory_bytes: 1024