#include <fstream>
#include <algorithm>
using namespace std;
const int P_MAX = 2005;
const int MOD = 2000003;
const int V_MAX = 1000050;
class Point {
public:
int x;
int y;
Point(int _x = 0, int _y = 0) :
x(_x), y(_y) {}
inline bool operator <(const Point &o) const {
if(x == o.x)
return y < o.y;
return x < o.x;
}
};
int Exp(int b, int e) {
if(e == 0) return 1;
int x = Exp(b, e >> 1);
if(e & 1) return 1LL * x * x % MOD * b % MOD;
return 1LL * x * x % MOD;
}
int fact[V_MAX / 2];
inline int Comb(int n, int k) {
return 1LL * fact[n] * Exp(fact[k], MOD - 2) % MOD * Exp(fact[n - k], MOD - 2) % MOD;
}
inline int GetPaths(Point a, Point b) {
int n = b.x - a.x;
int m = b.y - a.y;
return Comb(n + m, n);
}
int N, M, C;
Point p[P_MAX];
int nPaths[P_MAX];
int main() {
ifstream f("padure2.in");
ofstream g("padure2.out");
f >> N >> M >> C;
for(int i = 1, x, y; i <= C; i++) {
f >> x >> y;
p[i] = Point(x, y);
}
p[++C] = Point(1, 1);
p[++C] = Point(N, M);
fact[0] = 1;
for(int i = 1; i < V_MAX; i++)
fact[i] = int64_t(fact[i - 1]) * i % MOD;
sort(p + 1, p + C + 1);
nPaths[C] = 1;
for(int i = C; i > 0; i--) {
nPaths[i] = GetPaths(p[i], p[C]);
for(int j = i + 1; j < C; j++) {
if(p[i].y <= p[j].y) {
nPaths[i] = (nPaths[i] - int64_t(GetPaths(p[i], p[j])) * nPaths[j] % MOD + MOD) % MOD;
}
}
}
g << nPaths[1] << '\n';
return 0;
}