#include<iostream>
#include<vector>
#include<map>
#include<set>
#include<cassert>
#include<cassert>
#include<unordered_map>
#include<unordered_set>
#include<functional>
#include<queue>
#include<stack>
#include<cstring>
#include<algorithm>
#include<cmath>
#include<sstream>
#include<iomanip>
#include<cstdio>
#include<cstdlib>
#include<numeric>
#include<random>
#include<chrono>
#include<bitset>
using namespace std;

#define all(x) (x).begin(), (x).end()
#define pb push_back
#define xx first
#define yy second
#define sz(x) (int)(x).size()
#define gc getchar
#define IO ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0)
#define mp make_pair

#ifndef ONLINE_JUDGE
#  define LOG(x) (cerr << #x << " = " << (x) << endl)
#else
#  define LOG(x) ((void)0)
#endif

typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;

const double PI=acos(-1);
const ll INF = 1LL<<62;
const ll MINF = -(1LL<<62);

template<typename T> T getint() {
	T val=0;
	char c;
	
	bool neg=false;
	while((c=gc()) && !(c>='0' && c<='9')) {
		neg|=c=='-';
	}

	do {
		val=(val*10)+c-'0';
	} while((c=gc()) && (c>='0' && c<='9'));

	return val*(neg?-1:1);
}

//mt19937 rng(chrono::steady_clock::now().time_since_epoch().count()); uniform_int_distribution<int>(0, n-1)(rng)

using pt=pair<ll,ll>;

const int MAXN=200001;

int par[MAXN], sz[MAXN];

void init() {
	memset(par, -1, sizeof par);
	for(int i=0;i<MAXN;++i) sz[i]=1;
}

int get(int x) {
	if(par[x]==-1) return x;
	return par[x]=get(par[x]);
}

void merge(int x, int y) {
	int px=get(x), py=get(y);
	
	if(px==py) return ;
	
	if(sz[px]>sz[py]) {
		swap(px, py);
		swap(x, y); //:) lyft
	}
	
	par[px]=py;
	sz[py]+=sz[px];
}



pt rot90(pt& a) {
	return {a.yy,-a.xx};
}

int ccw(pt a, pt b, pt c) {
	b.xx-=a.xx;c.xx-=a.xx;
	b.yy-=a.yy;c.yy-=a.yy;
	
	if(__int128(b.yy)*__int128(c.xx) < __int128(c.yy)*__int128(b.xx)) {
		return -1;
	}else if(__int128(b.yy)*__int128(c.xx) == __int128(c.yy)*__int128(b.xx)) {
		return 0;
	}
	
	return 1;
}

ll sqdist(pt a, pt b) {
	return (a.xx-b.xx)*(a.xx-b.xx)+(a.yy-b.yy)*(a.yy-b.yy);
}


const ll mod=1e9+7;
ll fp(ll a, ll b) {
	if(b==0) return 1;
	ll fele=fp(a,b/2);
	ll ans=fele*fele%mod;
	if(b&1) ans=(ans*a)%mod;
	return ans;
}



int main() {
	IO;
	int n;
	cin>>n;
	vector<pt> t(n);
	ll orig_cnt=0;
	
	for(int i=0;i<n;++i) {
		cin>>t[i].xx>>t[i].yy;
		if(t[i].xx==0 && t[i].yy==0) orig_cnt++;
	}
	
	vector<pt> egyik, masik;
	pt orig={0,0};
	pt non;
	bool found=false;
	for(int i=0;i<n;++i) {
		if(t[i].xx!=0 || t[i].yy!=0) {
			non=t[i];
			found=true;
		}
	}
	
	if(!found) {
		cout<<orig_cnt<<"\n";
		return 0;
	}
	
	for(int i=0;i<n;++i) {
		if(t[i].xx==0 && t[i].yy==0) continue ;
		
		if(ccw(orig, non, t[i])>=0) egyik.pb(t[i]);
		else masik.pb(t[i]);
	}
	
	sort(all(egyik), [&](pt egyik, pt masik) {
		return ccw(orig, egyik, masik)>0;
	});
	
	sort(all(masik), [&](pt egyik, pt masik) {
		return ccw(orig, egyik, masik)>0;
	});
	
	vector<pt> lst;
	for(auto i:egyik) lst.pb(i);
	for(auto i:masik) lst.pb(i);
	
	//~ for(auto i:lst) cerr<<"0 0 "<<i.xx<<" "<<i.yy<<"\n";
	
	ll ans=1;
	vector<int> volt(sz(lst)); 
	array<int,4> cnt[sz(lst)];
	queue<pair<pt, pair<int,int>>> q;
	for(int i=0;i<sz(lst);++i) {
		if(lst[i].xx==0 && lst[i].yy==0) continue ;
		if(volt[i]) continue ;
		int j=i;
		while(j<sz(lst) && ccw(orig, lst[i], lst[j])==0) j++;
		j--;
		
		while(!q.empty() && (ccw(q.front().xx, orig, lst[i])>=0 || (__int128(q.front().xx.xx)*__int128(lst[i].xx)+__int128(q.front().xx.yy)*__int128(lst[i].yy))<0)) {
			auto akt=q.front();q.pop();
			q.push(mp(rot90(akt.xx),mp(akt.yy.xx,akt.yy.yy+1)));
		}
		for(int k=i;k<=j;++k) volt[k]=1;
		
		if(!q.empty() && ccw(q.front().xx, orig, lst[i])<0 && (__int128(q.front().xx.xx)*__int128(lst[i].xx)+__int128(q.front().xx.yy)*__int128(lst[i].yy))==0) {
			cnt[q.front().yy.xx][q.front().yy.yy]=j-i+1;
			auto akt=q.front();q.pop();
			q.push(mp(rot90(akt.xx),mp(akt.yy.xx,akt.yy.yy+1)));
		}else {
			cnt[i][0]=j-i+1;
			cnt[i][1]=0;
			cnt[i][2]=0;
			cnt[i][3]=0;
			volt[i]=2;
			q.push(mp(lst[i],mp(i,1)));
		}
		
		
		
	}
	
	for(int i=0;i<sz(lst);++i) {
		if(volt[i]==2) {
			//~ for(int j=0;j<4;++j) {
				//~ cerr<<cnt[i][j]<<" ";
			//~ }cerr<<"\n";
			ll cans=0;
			for(int c=0;c<(1<<4);++c) {
				bool ok=true;
				ll ways=1;
				for(int k=0;ok&&k<4;++k) {
					int cc=((c&(1<<k))?1:0)+((c&(1<<((k+1)%4)))?1:0);
					ok&=cc<2;
				}
				
				if(ok) {
					for(int k=0;k<4;++k) {
						if(c&(1<<k)) {
							ways*=fp(2, cnt[i][k])-1;
							ways%=mod;
						}
					}
					cans+=ways;
				}
				
			}
			
			
			ans=(ans*cans)%mod;
		}
	}

	ans+=orig_cnt-1;
	ans%=mod;
	if(ans<0) ans+=mod;
	cout<<(ans)<<"\n";
	return 0;
}


Measured memory_bytes: 21232