#include <bits/stdc++.h>
#define FAST {ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);}
#define FILES {freopen("input.txt", "r", stdin);freopen("output.txt", "w", stdout);}
#define ll long long
#define ull unsigned long long
#define pqueue priority_queue
#define pb push_back
#define fi first
#define se second
#define ld long double
#define pii pair<int,int>
#define pll pair<long long,long long>
#define all(a) (a).begin(), (a).end()
#define mp make_pair 
using namespace std;
// order_of_key -> # less than k
// find_by_order -> k-th element
// pq max element
 
const double eps = 0.00000001;
const int NMAX = 1e6+10;
const ll inf = LLONG_MAX/3;
const ll modi = 1e9+7;
# define M_PI           3.14159265358979323846

void solve() {
    int n;
    cin >> n;
    vector<ld>nes;
    vector<ll>nzm(n+1);
    nzm[0] = 1;
    for (int i = 1 ; i <= n ; i++ ) {
        nzm[i] = nzm[i-1]*2;
        nzm[i] %= modi;
    }
    for (int i = 0 ; i < n ; i++ ) {
        ld a,b;
        cin >> a >> b;
        nes.pb(atan2(b,a));
    }
    ll res = 0;
    sort(all(nes));
    if ( nes[n-1] > 0 ) {
        for (int i = 0 ; i < n ; i++ ) {
            if ( nes[i] < 0 ) nes.pb(nes[i] + 2*M_PI);
        }
    }
    //for (auto u : nes) cout << u << endl;
    int l = 0;
    for (int i = 0 ; i < n ; i++ ) {
        while(l < nes.size() && nes[i] + M_PI > nes[l]) {
            l++;
        }
        //cout << l-i << endl;
        res += nzm[l-i-1];
        res %= modi;
    }

    cout << (nzm[n] -1 - res + modi)%modi;


}

int main () { 
    FAST
    


    int t=1;

    /*
    cin >> t;
    //*/

    int i = 1;
    while(t--) {
        //cout << "Case #" << i++ << ": " ;
        solve();
    }
}