#include<bits/stdc++.h>
#define ll long long
#define ld long double
using namespace std;
ld eps=1e-10,pi=3.141592653589793238;
ld niz[400005];
ll MOD=1e9+7;
ll N,x,y,res=0,step[400005],minuss;
bool vecejed(ld a,ld b){
   if(abs(a-b)<=eps)
      return true;
   if(a>b)
      return true;
   return false;
}
ld orientacija(int x,int y){
   ld a=atan2(y,x);
   if(y<0)
      a=2*pi+a;
   return a;
}
ld ugao(ld x,ld y){
   if(abs(x-y)<=eps)
      return 0;
   if(x<y)
      return y-x;

}
int main(){
   cout<<setprecision(13)<<fixed;
   cin>>N;
   step[0]=1;
   for(int i=1;i<=N+N;i++)
      step[i]=(step[i-1]*2)%MOD;
   for(int i=1;i<=N;i++){
      cin>>x>>y;
      niz[i]=orientacija(x,y);
   }
   sort(niz+1,niz+1+N);
  // for(int i=1;i<=N;i++)
   //   cout<<niz[i]<<" ";
   //cout<<endl;
   for(int i=N+1;i<=2*N;i++)
      niz[i]=niz[i-N]+2*pi;

   res=1;///Prazan subset
   int pok=1;
   for(int i=1;i<=N;i++){
      //if(abs(niz[i-1]-niz[i])<=eps)
       //  continue;
      while(ugao(niz[i],niz[pok])<pi+eps)
         pok++;
      //cout<<i<<" "<<pok<<endl;
      res+=step[N-pok+i];
   }
   res=step[N]-res;
   if(res<0)
      res+=MOD;
   cout<<res<<"\n";
   return 0;
}
/*
7
1 0
2 0
-1 0
1 1
2 2
-3 -2
-12 -8
*/