//  ? ? ? ? ? ? ?
//  ? @roadfromroi ?
//  ? ? ? ? ? ? ?
#include <iostream>
#include "vector"
#include "algorithm"
#include "numeric"
#include "climits"
#include "iomanip"
#include "bitset"
#include "cmath"
#include "map"
#include "deque"
#include "array"
#include "set"
#define all(x) x.begin(), x.end()
using namespace std;
#define int long long
#define M_PI 3.14159265358979323846264338327950288
int mod = 1e9 + 7;
vector<int> pw2;
void solve() {
    int n;
    cin >> n;
    pw2.assign(n + 1, 1);
    for (int i = 1; i <= n; ++i) {
        pw2[i] = pw2[i - 1] * 2 % mod;
    }
    vector<long double> amg(n);
    for (int i = 0; i < n; ++i) {
        int x, y;
        cin >> x >> y;
        amg[i] = atan2(y, x);
    }
    sort(all(amg));
    int r = 0;
    for (int i = 0; i < n; ++i) {
        amg.push_back(amg[i] + M_PI * 2);
    }
    int res = 1;
    for (int l = 0; l < n; ++l) {
        while (amg[r] < amg[l] + M_PI)
            r++;
       // cout << l << ' ' << r << ' ' << pw2[r-l] - 1 << '\n';
        res += (pw2[r-l - 1]);
    }
    res %= mod;
    //cout << res << ' ' << pw2[n] << '\n';
    res = pw2[n] - res + mod;
    res %= mod;
    cout << res << '\n';
}
signed main() {
    ios::sync_with_stdio(0);
    cin.tie(0);cout.tie(0);
    int t = 1;
    while (t--) {
        solve();
    }
}