#include <bits/stdc++.h>

#define ll long long
#define ld long double
#define pb push_back
#define fi first
#define se second
#define en '\n'
#define sp ' '
#define tb '\t'
#define ri(n) int n; cin >> n
#define rl(n) ll n; cin >> n
#define rs(s) string s; cin >> s
#define rc(c) char c; cin >> c
#define rv(v) for (auto &x : v) cin >> x
#define pven(v) for (auto x : v) cout << x << en
#define pv(v) for (auto x : v) cout << x << sp; cout << en
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()
#define yes cout << "YES" << en
#define no cout << "NO" << en
#define smin(a, b) a = min(a, b)
#define smax(a, b) a = max(a, b)
#define ssort(a, b) if (a < b) swap(a, b)
#define bitcnt(a) (__builtin_popcountll(a))
#define bithigh(a) (63-__builtin_clzll(a))
#define lg bithigh
#define highpow(a) (1LL << (ll)lg(a))

using namespace std;

template <ll mod>
class mll{

    ll v;
    void norm(){ v %= mod; if(v<0) v += mod; }
    mll<mod> inv() const { return  *this ^ (mod-2); }
    mll<mod> pow(const ll& exp) const {
        if (exp < 0) return pow(-exp).inv();
        if (!exp) return 1;
        mll<mod> t = pow(exp/2);
        if (exp%2) return t*t*v;
        return t*t;
    }
    static vector<mll<mod> > fact, ifact;

public:
    mll<mod>(ll val = 0){ v = val; norm(); }
    bool operator==(const mll<mod>& a) const { return v == a.v; }
    bool operator!=(const mll<mod>& a) const { return v != a.v; }
    bool operator<(const mll<mod>& a) const { return v < a.v; }
    bool operator<=(const mll<mod>& a) const { return v <= a.v; }
    bool operator>(const mll<mod>& a) const { return v > a.v; }
    bool operator>=(const mll<mod>& a) const { return v >= a.v; }

    mll<mod> operator+(const mll<mod>& a) const { return mll<mod>(v+a.v); }
    mll<mod> operator-(const mll<mod>& a) const { return mll<mod>(v-a.v); }
    mll<mod> operator*(const mll<mod>& a) const { return mll<mod>(v*a.v); }
    mll<mod> operator/(const mll<mod>& a) const { return *this * a.inv(); }
    mll<mod> operator=(const mll<mod>& a) { v = a.v; norm(); return *this; }
    mll<mod> operator+=(const mll<mod>& a) { v += a.v; norm(); return *this; }
    mll<mod> operator-=(const mll<mod>& a) { v -= a.v; norm(); return *this; }
    mll<mod> operator*=(const mll<mod>& a) { v *= a.v; norm(); return *this; }
    mll<mod> operator/=(const mll<mod>& a) { v /= a.v; norm(); return *this; }
    mll<mod> operator^(const ll& a) const { return pow(a); }
    mll<mod> operator^=(const ll& a) { v = pow(a).v; return *this; }
    mll<mod> operator++() { v++; return *this; }
    mll<mod> operator++(int) { mll<mod> temp = *this; v++; return temp; }
    mll<mod> operator--() { v--; return *this; }
    mll<mod> operator--(int) { mll<mod> temp = *this; v--; return temp; }

    friend istream& operator>>(istream& is, mll<mod>& a){ is >> a.v; return is; }
    friend ostream& operator<<(ostream& os, const mll<mod>& a){ os << a.v; return os; }
};
#define mod mll<100000007>

struct Point{

    ll x, y;
    Point(ll _x = 0, ll _y = 0){ x = _x; y = _y; }
    void Read(){ cin >> x >> y; }
    Point inv() const { return Point(-x, -y); }
    static int sig(int x){ if (!x) return 0; return x / abs(x); }
    int Q() const {
        array<int, 2> s = {Point::sig(x), Point::sig(y)};
        if (s[0] == 1 && s[1] >= 0) return 1;
        if (s[0] <= 0 && s[1] == 1) return 2;
        if (s[0] == -1 && s[1] <= 0) return 3;
        return 4;
    }
    static int Orientation(const Point& a, const Point& b){
        return Point::sig(a.x * b.y - a.y * b.x);
    }
};

const ll LINF = 4e18;
const int mxN = 1e6+10, INF = 2e9;
ll n, m, r[mxN];
Point p[mxN];
mod v[2][mxN];

mod Pow2(int exp){ return mod(2)^exp; }

void Solve(){

    cin >> n;
    for (int i = 0; i < n; i++)
        p[i].Read();
    sort(p, p+n, [](const Point& a, const Point& b){
            int qa = a.Q(), qb = b.Q();
            if (qa^qb) return qa < qb;
            return Point::Orientation(a, b) > 0;
         });
    mod ans = 0;
    for (int i = 0, j = 0; i < n; i++){
        int k = n;
        Point t = p[i].inv();
        while (j < n && Point::Orientation(p[j], t) >= 0){
            if (!Point::Orientation(p[j], t) && p[j].Q() == t.Q()) smin(k, j);
            j++;
        }
        if (k<n) ans += j-k;
        r[i] = j-1;
    }
    for (int i = 0; i < n; i++){
        v[0][i] = Pow2(i);
        v[1][i] = Pow2(i-r[i]);
        if (i){
            v[0][i] += v[0][i-1];
            v[1][i] += v[1][i-1];
        }
    }
    for (int i = 0; i < n; i++)
        ans += Pow2(n-i-2) * (Pow2(-r[i]) * (v[0][r[i]] - v[0][i]) - (v[1][r[i]] - v[1][i]));
    cout << ans << en;
}

int main(){

    ios::sync_with_stdio(false);
    cin.tie(0); cout.tie(0); cerr.tie(0);
    cout << setprecision(12) << fixed;
    cerr << setprecision(12) << fixed;
    cerr << "Started!" << endl;

    int t = 1;
    //cin >> t;
    while (t--)
        Solve();

    return 0;
}