#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e18;
const long long MOD = 1e9 + 7;
const double pi = 3.14159265358979;
using vl = vector<long long>;
long long N;
long long Main() {
  cin >> N;
  vl A(N);
  vl B(N);
  for (long long i = 0, i_len = (N); i < i_len; ++i) {
    cin >> A[i];
    cin >> B[i];
  }
  long long totalCnt = 0;
  for (long long i = 0, i_len = (N); i < i_len; ++i) {
    for (long long j = 0, j_len = (N); j < j_len; ++j) {
      if ((A[i] * A[j] + B[i] * B[j]) != 0) {
        totalCnt = totalCnt + 1 % MOD;
      }
    }
  }
  cout << totalCnt << endl;
  return 0;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  Main();
  return 0;
}
