#include <bits/stdc++.h>
int factorial(int k) {
  int sum = 1;
  for (int i = 1; i <= k; ++i) {
    sum *= i;
  }
  return sum;
}
int main() {
  int n = 0;
  std::vector<int> a(0);
  std::vector<int> b(0);
  std::cin >> n;
  int aa = 0;
  int bb = 0;
  for (int i = 0; i < n; i++) {
    std::cin >> aa >> bb;
    a.push_back(aa);
    b.push_back(bb);
  }
  int couple = n + factorial(n) / 2;
  int m = 0;
  int count = n;
  for (int j = 0; j < n - 1; j++) {
    for (int k = n - 1; k > m; k--) {
      if (a[j] * a[k] + b[j] * b[k] != 0) {
        count++;
      }
    }
    m++;
  }
  std::cout << count % 1000000007;
  return 0;
}
