#include <bits/stdc++.h>
using namespace std;
int m;
double pocx,pocy;
double x[100007],y[100007];
double k[100007];
double n[100007];
long long delilac;
int pozk_pozn;
int negk_pozn;
int negk_negn;
int pozk_negn;
long long  NaStepen(int Osnova, int Stepen){
  long long Pom = 1LL;
  if (Stepen) {
      Pom = NaStepen(Osnova, Stepen / 2)%delilac;
      Pom = (Pom * Pom)%delilac;
      if (Stepen%2==1) Pom /= (Pom * Osnova)%delilac;
  }
  return Pom;
};
int main(){
  cin>>m;
  cin>>pocx>>pocy;
  if(m==1){    
    if(pocx==0 and pocy==0)cout<<1<<endl;  
    else cout<<0<<endl;
    return 0;
  }
  delilac=1000000009;
  for(int i=2;i<=m;i++){
      cin>>x[i]>>y[i];
      if(pocx-x[i]==0)k[i]=0;
      else k[i]=(pocy-y[i])/(pocx-x[i]);
      n[i]=pocy-(k[i]*x[i]);
      if(k[i]<=0 and n[i]>=0)negk_pozn++;
      if(k[i]>=0 and n[i]>=0)pozk_pozn++;
      if(k[i]<=0 and n[i]<=0)negk_negn++;
      if(k[i]>=0 and n[i]<=0)pozk_negn++;

  }
  long long res=((NaStepen(2,negk_pozn)-(long long)(1))*(NaStepen(2,pozk_pozn)-(long long)(1)))%delilac;;
  res+=((NaStepen(2,pozk_pozn)-(long long)(1))*(NaStepen(2,pozk_negn)-(long long)(1)))%delilac;
  res=res%delilac;
  res+=((NaStepen(2,negk_pozn)-(long long)(1))*(NaStepen(2,negk_negn)-(long long)(1)))%delilac;
  res=res%delilac;
  cout<<res<<endl;
  return 0;
}
/*/
4
0 1
-2 -1
-3 -1
3  -1



/*/