#define here cerr<<"===========================================\n"
#define dbg(x) cerr<<#x<<": "<<x<<endl;
#include "bits/stdc++.h"
//#include <ext/pb_ds/tree_policy.hpp>
//#include <ext/pb_ds/assoc_container.hpp>
#define ld double
#define ll long long
#define llinf 100000000000000000LL // 10^17
#define iinf 1000000001
#define pb push_back
#define popb pop_back
#define fi first
#define sc second
#define endl '\n'
#define pll pair<ll,ll>
#define pld pair<ld,ld>
#define sz(a) (ll)(a.size())
#define all(a) a.begin(),a.end()
#define ceri(a,l,r) {cerr<<#a<<": ";for(ll i_ = l;i_<=r;i_++) cerr<<a[i_]<< " ";cerr<<endl;}
#define cer(a) {cerr<<#a<<": ";for(ll x_ : a) cerr<<x_<< " ";cerr<<endl;}

#define daj_mi_malo_vremena ios_base::sync_with_stdio(false);cerr.tie(0);cout.tie(0);cin.tie(0);

using namespace std;
//using namespace __gnu_pbds;

/*
typedef tree<int,null_type,less<ll>,rb_tree_tag,tree_order_statistics_node_update> ordered_set;
typedef tree<int,null_type,less_equal<ll>,rb_tree_tag,tree_order_statistics_node_update> ordered_multiset;
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
ll rnd(ll l,ll r){
    return uniform_int_distribution<ll>(l,r)(rng);
}
*/
#define mod 1000000007
ll add(ll x,ll y){
    x+=y;
    if(x<0){
        x%=mod;
        x+=mod;
    }else{
        if(x>=mod) x%=mod;
    }
    return x;
}
ll mul(ll a,ll b){
	ll ans = (a*b)%mod;
	if(ans<0) ans+=mod;
	return ans;
}
ll po(ll x,ll y){
    if(y==0) return 1LL;
    ll ans = po(x,y/2);
    ans = mul(ans,ans);
    if(y&1) ans = mul(ans,x);
    return ans;
}
ll cross(pll a,pll b,pll c){
    return (b.fi-a.fi)*(c.sc-a.sc) - (b.sc-a.sc)*(c.fi-a.fi);
}
bool right(pll a,pll b,pll c){
    return cross(a,b,c)>=0;
}
bool leftt(pll a,pll b,pll c){
    return !right(a,b,c);
}
#define maxn 100005
ll n;
pll a[maxn];
ll sign(pll p){
    pll x = {-mod,-1};
    pll y = {mod,1};
    dbg(cross(x,y,p));
    bool ok = right(x,y,p);
    if(ok) return 1;
    else return -1;
    //if(x==0) -1;
    //return x/abs(x);
}
bool cmp(pll a,pll b){
    if(sign(a)!=sign(b)) return sign(a)>sign(b);
    return right({0,0},a,b);
}
bool col(pll a,pll b){
    return a.fi*b.sc==b.fi*a.sc;
}
vector<pll> v,w;
ll get(vector<pll> v,vector<pll> w){
    ll d = 1;
    ll j = 0;
    ll cur = sz(w);
    ll ans;
    //ans = po(2,cur) - 1;
    ans = 0;
    //here;
    //for(pll p : v) cerr<<p.fi<<" "<<p.sc<<endl;
    //here;
    //for(pll p : w) cerr<<p.fi<<" "<<p.sc<<endl;
    //here;
    for(ll i = 0;i<sz(v);i++){
        ll del = 0;
        while(j<sz(w)&&right({0,0},v[i],w[j])){
            j++;
            cur--;
            del++;
        }
        ll curadd = add(po(2,d+cur)-1,-(po(2,cur)-1));
        //cerr<<i<< " "<<j<<" "<<d<< " "<<cur<<" "<<curadd<<endl;
        ans = add(ans,curadd);
        //ll siz = n-cur-d-del;
        //curadd = add(po(2,del+siz)-1,-po(2,siz)-1);
        //ans = add(ans,curadd);
        cur+=d;
        d = 1;
    }
    return ans;
}
void tc(){
    cin >> n;
    for(ll i = 1;i<=n;i++) cin >> a[i].fi >> a[i].sc;
    for(ll i = 1;i<=n;i++){
        if(sign(a[i])==1) v.pb(a[i]);
        else w.pb(a[i]);
    }
    sort(all(v),cmp);
    sort(all(w),cmp);
    ll ans = get(v,w);
    //dbg(ans);
    ans = add(ans,get(w,v));
    //dbg(ans);
    ans = add(po(2,n)-1,-ans);
    //dbg(ans);
    //ans = add(ans,(cnt*(cnt-1))/2);
    cout<<ans<<endl;
}
int main(){
	daj_mi_malo_vremena
    int t; t = 1;
    while(t--){
        tc();
    }
	return 0;
}