#include <iostream>
#include<vector>
#include<algorithm>
#include<string>
#include<map>
#include<set>
#include<stack>
#include<queue>
#include<math.h>
using namespace std;
typedef long long ll;
#define int long long
typedef vector<int> VI;
typedef pair<int, int> pii;
typedef vector<pii> VP;
typedef vector<string> VS;
typedef priority_queue<int> PQ;
template<class T>bool chmax(T &a, const T &b) { if (a < b) { a = b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b < a) { a = b; return 1; } return 0; }
#define fore(i,a) for(auto &i:a)
#define REP(i,n) for(int i=0;i<n;i++)
#define eREP(i,n) for(int i=0;i<=n;i++)
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define eFOR(i,a,b) for(int i=(a);i<=(b);++i)
#define SORT(c) sort((c).begin(),(c).end())
#define rSORT(c) sort((c).rbegin(),(c).rend())
#define LB(x,a) lower_bound((x).begin(),(x).end(),(a))
#define UB(x,a) upper_bound((x).begin(),(x).end(),(a))
#define INF 1000000000
#define LLINF 9223372036854775807
#define mod 1000000007
//priority_queue<int,vector<int>, greater<int> > q2;

ll comb(ll N_, ll C_) {
	const int NUM_ = 400001;
	static ll fact[400002], factr[400002], inv[400002];
	if (fact[0] == 0) {
		inv[1] = fact[0] = factr[0] = 1;
		for (int i = 2; i <= NUM_; ++i) inv[i] = inv[mod % i] * (mod - mod / i) % mod;
		for (int i = 1; i <= NUM_; ++i) fact[i] = fact[i - 1] * i%mod, factr[i] = factr[i - 1] * inv[i] % mod;
	}
	if (C_<0 || C_>N_) return 0;
	return factr[C_] * fact[N_] % mod*factr[N_ - C_] % mod;
}
ll modpow(ll a, ll n = mod - 2) {
	ll r = 1;
	while (n) r = r * ((n % 2) ? a : 1) % mod, a = a * a%mod, n >>= 1;
	return r;
}
VP V;
int N;

int sei(int now) {
	int L = now, R = N - 1, M;

	int x = V[now].first, y = V[now].second;
	int res = -1;
	while (L <= R) {
		M = (L + R) / 2;

		int nx = V[M].first, ny = V[M].second;



		if (x*nx + y * ny < 0) {
			R = M - 1;
			//chmin(ans, M);
		}
		else {
			L = M + 1;
			chmax(res, M);
		}



	}
	//cout << "K" << endl;
	return res;
}


signed main() {
	cin.tie(0);
	ios::sync_with_stdio(false);

	cin >> N;
	V.resize(N);
	int n = N;
	int ans = 0;

	REP(i, N) cin >> V[i].first >> V[i].second;
	sort(V.begin(), V.end(), [](const auto &p1, const auto &p2) {
		return atan2l(p1.second, p1.first) < atan2l(p2.second, p2.first);
	});

	//REP(i, N)cout << V[i].first << " " << V[i].second << endl;

	REP(i, N - 1) {
		int cnt = 0;//頂点iと垂直なやつの数
		int L = i + 1, R = sei(i), mid;
		int ma = R;
		if (R == -1)break;
		int l = R + 1, r = N - 1;
		int x = V[i].first, y = V[i].second;
		int mi = INF;


		while (L <= R) {
			mid = (L + R) / 2;
			int nx = V[mid].first, ny = V[mid].second;
			if (x*nx+y*ny == 0) {
				R = mid - 1;
				chmin(mi, mid);
			}
			else {
				L = mid + 1;
				//chman(ans, M);
			}
		}

		if (mi != INF)cnt = ma - mi + 1;
		//cout << i << " " << cnt << endl;
		ma = -1; mi = INF;
		L = l, R = r;

		while (l <= r) {
			mid = (l + r) / 2;
			int nx = V[mid].first, ny = V[mid].second;

			if (x*nx + y * ny > 0) {
				r = mid - 1;
				//chmin(ans, M);
			}
			else {
				l = mid + 1;
				chmax(ma, mid);
			}
		}
		//cout << "K" << endl;
		while (L <= R) {
			mid = (L + R) / 2;
			int nx = V[mid].first, ny = V[mid].second;
			if (x*nx + y * ny >= 0) {
				R = mid - 1;
				chmin(mi, mid);
			}
			else {
				L = mid + 1;
				//chman(ans, M);
			}
		}


		if (mi != INF && ma!=-1)cnt += ma - mi + 1;
		if (cnt != 0) {
			n--;
			ans += (modpow(2, cnt) - 1)*modpow(2, n - cnt);
		}
		//cout << i << " " << cnt << endl;

	}

	cout << (modpow(2, N) - ans + mod - 1) % mod << endl;


	return 0;
}

