#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;
for(int j=x+2;j<=w;j++){
for(int k=1;k<=y-1;k++){
p[k][j]=1;
}
}
for(int j=y+2;j<=h;j++){
for(int k=1;k<=x-1;k++){
p[j][k]=1;
}
}
}
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+Pnk7CgkJZm9yKGludCBqPXgrMjtqPD13O2orKyl7CgkJCWZvcihpbnQgaz0xO2s8PXktMTtrKyspewoJCQkJcFtrXVtqXT0xOwoJCQl9CgkJfQoJCWZvcihpbnQgaj15KzI7ajw9aDtqKyspewoJCQlmb3IoaW50IGs9MTtrPD14LTE7aysrKXsKCQkJCXBbal1ba109MTsKCQkJfQoJCX0KCX0KCWRwWzFdWzFdPTE7Cglmb3IoaW50IGk9MTtpPD1oO2krKyl7CgkJZm9yKGludCBqPTE7ajw9dztqKyspewoJCQlpZihwW2ldW2pdPT0wICYmIGkraj49Myl7CgkJCQlkcFtpXVtqXT0oZHBbaS0xXVtqXStkcFtpXVtqLTFdKSVNT0Q7CgkJCX0KCQl9Cgl9Cgljb3V0PDxkcFtoXVt3XTw8ZW5kbDsKCXJldHVybiAwOwp9