#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int N;
  cin >> N;
  long long int a[200000];
  long long int b[200000];
  for (int i = 0; i < N; ++i) {
    cin >> a[i] >> b[i];
  }
  int count = 0;
  for (int i = 0; i < N; ++i) {
    for (int j = i; j < N; ++j) {
      if (i == j) {
        count++;
        continue;
      }
      if (a[i] * a[j] + b[i] * b[j] != 0) {
        count++;
      }
    }
  }
  cout << count % 1000000007 << "\n";
  return 0;
}
