#include <bits/stdc++.h>

#define FAST ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);cerr.tie(0)
#define mp make_pair
#define xx first
#define yy second
#define pb push_back
#define pf push_front
#define popb pop_back
#define popf pop_front
#define all(x) (x).begin(),(x).end()
#define inv(n) power((n), mod - 2)
#define ff(i,a,b) for (int (i) = (a); (i) < (b); (i)++)
#define fff(i,a,b) for (int (i) = (a); (i) <= b; (i)++)
#define bff(i,a,b) for (int (i) = (b)-1; (i) >= (a); (i)--)
#define bfff(i,a,b) for (int (i) = (b); (i) >= (a); (i)--)
#define sum_overflow(a,b) __builtin_add_overflow_p ((a), (b), (__typeof__ ((a) + (b))) 0)
#define mul_overflow(a,b) __builtin_mul_overflow_p ((a), (b), (__typeof__ ((a) + (b))) 0)

using namespace std;
long double typedef ld;
unsigned int typedef ui;
long long int typedef li;
pair<int,int> typedef pii;
pair<li,li> typedef pli;
pair<ld,ld> typedef pld;
vector<vector<int>> typedef graph;
unsigned long long int typedef ull;
//const int mod = 998244353;
const int mod = 1000000007;







//Note to self: Check for overflow

int power(int a, int n)
{
    li c=1;
    while (n)
    {
        if (n&1) (c*=a)%=mod;
        a=(li)a*a%mod,n>>=1;
    }
    return c;
}

struct point
{
    int x,y;
    li operator* (point X)
    {
        return (li)x*X.y - (li)y*X.x;
    }
} niz[100005];

bool gore(point X)
{
    if (X.y>0) return true;
    if (X.y<0) return false;
    return X.x>0;
}

struct bogosort
{
    bool operator() (point A, point B)
    {
        if (gore(A) && !gore(B)) return true;
        if (gore(B) && !gore(A)) return false;
        return A*B>0;
    }
};

int main()
{
    FAST;

    int n; cin>>n;
    ff(i,0,n) cin>>niz[i].x>>niz[i].y;
    sort(niz,niz+n,bogosort());

    /*cout<<endl;
    ff(i,0,n) cout<<niz[i].x<<" "<<niz[i].y<<endl;
    ff(i,1,n) if (niz[i-1]*niz[i]<0) return cout<<"fatal error "<<i<<endl,0;*/

    int p=0,ans=0;
    ff(i,0,n)
    {
        while (niz[i]*niz[p]>=0) (p+=1)%=n;
        int fh=(p-1-i+3*n)%n,sh=n-1-fh;
        (ans+=power(2,fh))%=mod;
    }

    cout<<((power(2,n)+mod-ans)%mod+mod-1)%mod<<"\n";
}