#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<double> A(n), B(n);
  for (int i = 0; i < n; i++) {
    cin >> A[i];
    cin >> B[i];
  }
  unsigned long long int res = 0;
  for (int bits = 1; bits < (1 << n); bits++) {
    vector<double> tmp_a, tmp_b;
    for (int i = 0; i < n; i++) {
      int mask = 1 << i;
      if (bits & mask) {
        tmp_a.push_back(A[i]);
        tmp_b.push_back(B[i]);
      }
    }
    bool cnt = true;
    for (int j = 0; j < (int)tmp_a.size(); j++) {
      for (int k = j + 1; k < (int)tmp_a.size(); k++) {
        int tmp = (int)(tmp_a[j] * tmp_a[k] + tmp_b[j] * tmp_b[k]);
        if (tmp == 0) {
          cnt = false;
          break;
        }
      }
    }
    if (cnt == true) {
      res++;
    }
  }
  cout << res % 1000000007;
  return 0;
}
