#include <bits/stdc++.h>
#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define eb emplace_back
#define all(x) (x).begin(),(x).end()
#define sz(x) ((int)(x).size())
using namespace std;
using ll = long long;
using ld = long double;
template<class T> bool chmax(T &a,T b){if(a<b){a=b;return true;}return false;}
template<class T> bool chmin(T &a,T b){if(a>b){a=b;return true;}return false;}

constexpr int MOD=1000000007;
//constexpr int MOD=998244353;
class modint{
public:
  long long x;
  constexpr modint(long long x=0):x((x%MOD+MOD)%MOD){}
  constexpr modint operator-() const{return modint(-x);}
  constexpr modint& operator+=(const modint& a){
    if((x+=a.x)>=MOD) x-=MOD;
    return *this;
  }
  constexpr modint& operator-=(const modint& a){
    if((x+=MOD-a.x)>=MOD) x-=MOD;
    return *this;
  }
  constexpr modint& operator*=(const modint& a){
    (x*=a.x)%=MOD;
    return *this;
  }
  constexpr modint operator+(const modint& a) const{return modint(*this)+=a;}
  constexpr modint operator-(const modint& a) const{return modint(*this)-=a;}
  constexpr modint operator*(const modint& a) const{return modint(*this)*=a;}
  constexpr bool operator==(const modint& a) const{return this->x==a.x;}
  constexpr bool operator!=(const modint& a) const{return this->x!=a.x;}
  constexpr modint pow(long long expo) const{
    if(expo==0)  return 1;
    modint a=pow(expo>>1);
    a*=a;
    if(expo&1)  a*=(*this);
    return a;
  }
  //for prime MOD
  constexpr modint inv() const{return pow(MOD-2);}
  constexpr modint& operator/=(const modint& a){return (*this)*=a.inv();}
  constexpr modint operator/(const modint& a) const{return modint(*this)/=a;}
};
istream& operator>>(istream& is,const modint& a){return is >> a.x;}
ostream& operator<<(ostream& os,const modint& a){return os << a.x;}

const int MAX=220000;
vector<modint> fac(MAX,0);
vector<modint> finv(MAX,0);
vector<modint> inv(MAX,0);
void COMinit(){
  fac.at(0)=fac.at(1)=1;
  finv.at(0)=finv.at(1)=1;
  inv.at(1)=1;
  for(int i=2;i<MAX;i++){
    fac.at(i)=fac.at(i-1)*i;
    inv.at(i)=-inv.at(MOD%i)*(MOD/i);
    finv.at(i)=finv.at(i-1)*inv.at(i);
  }
  //for(int i=0;i<100;i++)  cout << fac.at(i)*finv.at(i) << endl;
}
modint COM(int n,int k){
  if(n<k) return 0;
  if(n<0 || k<0)  return 0;
  return fac.at(n)*finv.at(k)*finv.at(n-k);
}

int main(){
  ios_base::sync_with_stdio(false);cin.tie(0);
  int H,W,N;
  cin >> H >> W >> N;
  vector<pair<int,int>> rc(N+1);
  for(int i=0;i<N;i++)  cin >> rc.at(i).fi >> rc.at(i).se;

  COMinit();
  rc.at(N)=mp(1,1);
  sort(all(rc));
  //for(int i=0;i<N+1;i++)  cout << rc.at(i).fi << " " << rc.at(i).se << endl;
  vector<vector<modint>> dp(N+1,vector<modint>(2,0));
  dp.at(0).at(0)=1;
  for(int i=1;i<N+1;i++){
    int nr=rc.at(i).fi;
    int nc=rc.at(i).se;
    for(int j=0;j<i;j++){
      int pr=rc.at(j).fi;
      int pc=rc.at(j).se;
      int h=nr-pr;
      int w=nc-pc;
      dp.at(i).at(0)+=dp.at(j).at(1)*COM(h+w,h);
      dp.at(i).at(1)+=dp.at(j).at(0)*COM(h+w,h);
      //cout << "(" << pr << "," << pc << ") , (" << nr << "," << nc << ") " << dp.at(i).at(0) << " " << dp.at(i).at(1) << endl;
    }
  }
  modint ans=COM(H+W-2,H-1);
  modint ng=0;
  for(int i=1;i<N+1;i++){
    int pr=rc.at(i).fi;
    int pc=rc.at(i).se;
    int h=H-pr;
    int w=W-pc;
    ng+=dp.at(i).at(1)*COM(h+w,h);
    ng-=dp.at(i).at(0)*COM(h+w,h);
  }
  cout << ans-ng << endl;

  return 0;
}

Measured memory_bytes: 5632