#include<iostream>
using namespace std;
#define MOD 1000000007
#define MAX_N 1200
int dp[MAX_N][MAX_N],p[MAX_N][MAX_N],h,w,k,x,y;
int main(){
cin>>h>>w>>k;
for(int i=0;i<k;i++){
cin>>x>>y;
p[x+2][1]++;
p[x+2][y]--;
p[1][y+2]++;
p[x][y+2]--;
}
for(int i=1;i<=h;i++){
for(int j=2;j<=w;j++){
p[i][j]+=p[i][j-1];
}
}
for(int i=1;i<=w;i++){
for(int j=2;j<=h;j++){
p[i][j]+=p[i-1][j];
}
}
dp[1][1]=1;
for(int i=1;i<=h;i++){
for(int j=1;j<=w;j++){
if(p[i][j]==0 && i+j>=3){
dp[i][j]=(dp[i-1][j]+dp[i][j-1])%MOD;
}
}
}
cout<<dp[h][w]<<endl;
return 0;
}
I2luY2x1ZGU8aW9zdHJlYW0+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CgojZGVmaW5lIE1PRCAxMDAwMDAwMDA3CiNkZWZpbmUgTUFYX04gMTIwMAoKaW50IGRwW01BWF9OXVtNQVhfTl0scFtNQVhfTl1bTUFYX05dLGgsdyxrLHgseTsKCmludCBtYWluKCl7CgljaW4+Pmg+Pnc+Pms7Cglmb3IoaW50IGk9MDtpPGs7aSsrKXsKCQljaW4+Png+Pnk7CgkJcFt4KzJdWzFdKys7CgkJcFt4KzJdW3ldLS07CgkJcFsxXVt5KzJdKys7CgkJcFt4XVt5KzJdLS07Cgl9Cglmb3IoaW50IGk9MTtpPD1oO2krKyl7CgkJZm9yKGludCBqPTI7ajw9dztqKyspewoJCQlwW2ldW2pdKz1wW2ldW2otMV07CgkJfQoJfQoJZm9yKGludCBpPTE7aTw9dztpKyspewoJCWZvcihpbnQgaj0yO2o8PWg7aisrKXsKCQkJcFtpXVtqXSs9cFtpLTFdW2pdOwoJCX0KCX0KCWRwWzFdWzFdPTE7Cglmb3IoaW50IGk9MTtpPD1oO2krKyl7CgkJZm9yKGludCBqPTE7ajw9dztqKyspewoJCQlpZihwW2ldW2pdPT0wICYmIGkraj49Myl7CgkJCQlkcFtpXVtqXT0oZHBbaS0xXVtqXStkcFtpXVtqLTFdKSVNT0Q7CgkJCX0KCQl9Cgl9Cgljb3V0PDxkcFtoXVt3XTw8ZW5kbDsKCXJldHVybiAwOwp9