Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>

const int mod = 1000000007;
struct mint {
  ll x;
  mint(ll x=0):x((x%mod+mod)%mod){}
  mint operator-() const { return mint(-x);}
  mint& operator+=(const mint a) {
    if ((x += a.x) >= mod) x -= mod;
    return *this;
  }
  mint& operator-=(const mint a) {
    if ((x += mod-a.x) >= mod) x -= mod;
    return *this;
  }
  mint& operator*=(const mint a) { (x *= a.x) %= mod; return *this;}
  mint operator+(const mint a) const { return mint(*this) += a;}
  mint operator-(const mint a) const { return mint(*this) -= a;}
  mint operator*(const mint a) const { return mint(*this) *= a;}
  mint pow(ll t) const {
    if (!t) return 1;
    mint a = pow(t>>1);
    a *= a;
    if (t&1) a *= *this;
    return a;
  }
  mint inv() const { return pow(mod-2);}
  mint& operator/=(const mint a) { return *this *= a.inv();}
  mint operator/(const mint a) const { return mint(*this) /= a;}
};
istream& operator>>(istream& is, const mint& a) { return is >> a.x;}
ostream& operator<<(ostream& os, const mint& a) { return os << a.x;}

vector<P> p;

int main() {
    int n;
    cin >> n;
    int zero = 0;
    rep(i,n) {
        ll x, y;
        cin >> x >> y;
        int zero = 0;
        map<pair<ll,ll>,P> mp;
        if (x == 0 && y == 0) {
            zero++;
            continue;
        }
        ll g = gcd(x, y);
        x /= g;
        y /= g;
        if(y < 0) x = -x, y = -y;
        if(y == 0 && x < 0) x = -x, y = -y;
        bool rot = (x <= 0);
        if(rot) {
            double tmp = x;
            x = y, y = -tmp;
        }
        if(rot) mp[{x,y}].first++;
        else mp[{x,y}].second++;
    }

    mint ans = 1;
    for(auto p : mp){
        int s = p.second.first;
        int t = p.second.second;
        mint now = 1;
        now += mint(2).pow(s) - 1;
        now += mint(2).pow(t) - 1;
        ans *= now;
    }

    ans -= 1;

    ans += zero;
    cout << ans << endl;
    return 0;
}

Compiler output:
a.cc:5:11: error: two or more data types in declaration of 'type name'
    5 | using P = pair<int, int>
      |           ^~~~~~~~~~~~~~
a.cc: In constructor 'mint::mint(ll)':
a.cc:10:21: error: 'mod' was not declared in this scope; did you mean 'modf'?
   10 |   mint(ll x=0):x((x%mod+mod)%mod){}
      |                     ^~~
      |                     modf
a.cc: In member function 'mint& mint::operator+=(mint)':
a.cc:13:23: error: 'mod' was not declared in this scope; did you mean 'modf'?
   13 |     if ((x += a.x) >= mod) x -= mod;
      |                       ^~~
      |                       modf
a.cc: In member function 'mint& mint::operator-=(mint)':
a.cc:17:15: error: 'mod' was not declared in this scope; did you mean 'modf'?
   17 |     if ((x += mod-a.x) >= mod) x -= mod;
      |               ^~~
      |               modf
a.cc: In member function 'mint& mint::operator*=(mint)':
a.cc:20:50: error: 'mod' was not declared in this scope; did you mean 'modf'?
   20 |   mint& operator*=(const mint a) { (x *= a.x) %= mod; return *this;}
      |                                                  ^~~
      |                                                  modf
a.cc: In member function 'mint mint::inv() const':
a.cc:31:33: error: 'mod' was not declared in this scope; did you mean 'modf'?
   31 |   mint inv() const { return pow(mod-2);}
      |                                 ^~~
      |                                 modf
a.cc: At global scope:
a.cc:38:8: error: 'P' was not declared in this scope
   38 | vector<P> p;
      |        ^
a.cc:38:9: error: template argument 1 is invalid
   38 | vector<P> p;
      |         ^
a.cc:38:9: error: template argument 2 is invalid
a.cc: In function 'int main()':
a.cc:48:25: error: 'P' was not declared in this scope
   48 |         map<pair<ll,ll>,P> mp;
      |                         ^
a.cc:48:26: error: template argument 2 is invalid
   48 |         map<pair<ll,ll>,P> mp;
      |                          ^
a.cc:48:26: error: template argument 4 is invalid
a.cc:63:19: error: invalid types 'int[<brace-enclosed initializer list>]' for array subscript
   63 |         if(rot) mp[{x,y}].first++;
      |                   ^
a.cc:64:16: error: invalid types 'int[<brace-enclosed initializer list>]' for array subscript
   64 |         else mp[{x,y}].second++;
      |                ^
a.cc:68:18: error: 'mp' was not declared in this scope; did you mean 'p'?
   68 |     for(auto p : mp){
      |                  ^~
      |                  p