#include<bits/stdc++.h>
using namespace std;
/**
********************************************************************
******************* Author:Bisnu sarkar ****************************
********************************************************************
**/
#define ull            unsigned long long
#define ll             long long
#define vi             vector<int>
#define pb             push_back
#define mp             make_pair
#define pii            pair<int,int>
#define vit            vector<int> :: iterator
#define sit            set<int> :: iterator
#define vrit           vector<int> :: reverse iterator
#define ff             first
#define ss             second
#define endl           '\n';
#define what_is(x)     cerr << #x << " is " << x << endl;
///*....Debugger....*/
#define error(args...) { string _s = #args; replace(_s.begin(), _s.end(), ',', ' '); stringstream _ss(_s); istream_iterator<string> _it(_ss); err(_it, args); }
void err(istream_iterator<string> it) {   cout << endl ;}

template<typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args)
{
	cerr << *it << " = " << a << ' ' ;
	err(++it, args...);
}
int ini() {int x; scanf("%d", &x); return x;}
long long inl() { long long x; scanf("%lld", &x); return x;}
double ind() {double x; scanf("%lf", &x); return x;}
#define Iin ini();
#define Lin inl();
#define Din ind();

int set_1(int n, int pos) {return n = (n | (1 << pos));}
int reset_0(int n, int pos) {return n = n & ~(1 << pos);}
bool check_bit(int n, int pos) {return n = n & (1 << pos);}

int dx[8] = {1, 0, -1, 0, -1, -1, 1, 1};
int dy[8] = {0, 1, 0, -1, -1, 1, -1, 1};
const int N = (int) 2e5 + 5;
const ll M = (ll) 1e9 + 7;
const double pi = 2 * acos(0.0);
pii p[3005];

ll res[N], fac[N], inverse[N];

ll mul(ll x, ll y) {
	if (x * y >= M) {
		return (x * y) % M;
	}
	return x * y;
}

long long bigmod(long long b,long long p,long long m){
    if(p==0)return 1;
    long long x=bigmod(b,p/2,m);
    x=mul(x,x);
    if(p%2==1)x=mul(x,b);
    return x;
}

ll f(ll x, ll y, ll xx, ll yy) {
	ll p = xx - x, q = yy - y;
	ll ans = fac[p + q];

	ans = mul(ans, inverse[p]);
	ans = mul(ans, inverse[q]);
	return ans;
}

int main()
{
	//freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);
	//ios_base::sync_with_stdio(false);
	//cin.tie(NULL);
	fac[0] = 1ll;
	inverse[0] =  bigmod(fac[0], M - 2ll,M);
	for (ll i = 1; i <= N; i++) {
		fac[i] = mul(i, fac[i - 1]);
		inverse[i] =  bigmod(fac[i], M - 2ll,M);
	}

	int t = 1;
	while (t--) {
		int n, m, k;

		scanf("%d %d %d", &n, &m, &k);

		for (int i = 1; i <= k; i++) {
			int x, y;
			scanf("%d %d", &x, &y);
			p[i] = {x, y};
		}
		p[k + 1] = {n, m};
		sort(p + 1, p + k + 2);

		for (int i = 1; i <= k + 1; i++) {
			res[i] = f(1ll, 1ll, (ll)p[i].ff, (ll)p[i].ss);
		}


		for (int i = 1; i <= k; i++) {
			for (int j = i + 1; j <= k + 1; j++) {
				if(p[j].ff<p[i].ff or p[j].ss<p[i].ss)continue;
				res[j] = (res[j] - mul(res[i], f((ll)p[i].ff, (ll)p[i].ss, (ll)p[j].ff, (ll)p[j].ss)));
				if(res[j]<0){
					res[j]=(res[j]+M)%M;
				}
				if(res[j]>=M)res[j]%=M;
			}
		}

		printf("%lld\n", res[k + 1] % M);
		//printf("Case %d: ",++te);
	}
	return 0;
}
 

Measured memory_bytes: 4352