import std.stdio, std.array, std.string, std.conv, std.algorithm;
import std.typecons, std.range, std.random, std.math, std.container;
import std.numeric, std.bigint, core.bitop, core.stdc.string;

immutable long MOD = 10^^9 + 7;
long[] F, G;

void main() {
    auto s = readln.split.map!(to!int);
    auto H = s[0];
    auto W = s[1];
    auto N = s[2];
    auto RC = N.iota.map!(_ => readln.split.map!(x => x.to!int-1).array).array;
    RC.sort();
    RC ~= [H-1, W-1];
    N += 1;

    F = new long[](H+W+5);
    G = new long[](H+W+5);
    F[0] = F[1] = G[0] = G[1] = 1;
    foreach (i; 2..H+W+5) F[i] = F[i-1] * i % MOD;
    foreach (i; 2..H+W+5) G[i] = powmod(F[i], MOD-2, MOD);


    auto dp = new long[](N);

    foreach (i; 0..N) {
        dp[i] = comb(RC[i][0] + RC[i][1], RC[i][0]);
        foreach (j; 0..i) {
            if (RC[j][0] <= RC[i][0] && RC[j][1] <= RC[i][1]) {
                dp[i] -= dp[j] * comb(RC[i][0] - RC[j][0] + RC[i][1] - RC[j][1], RC[i][0] - RC[j][0]) % MOD;
                dp[i] %= MOD;
            }
        }
    }

    dp[N-1] = (dp[N-1] + MOD) % MOD;
    dp[N-1].writeln;
}

long comb(long n, long r) {
    return F[n] * G[r] % MOD * G[n-r] % MOD;
}

long powmod(long a, long x, long m) {
    long ret = 1;
    while (x) {
        if (x % 2) ret = ret * a % m;
        a = a * a % m;
        x /= 2;
    }
    return ret;
}
