#include <bits/stdc++.h>
int main() {
  int N;
  scanf("%d", &N);
  long int sum = 0;
  long long int A[N], B[N];
  for (int i = 0; i < N; i++) {
    scanf("%lld %lld", &A[i], &B[i]);
  }
  for (int i = 0; i < N; i++) {
    for (int j = i; j < N; j++) {
      if ((A[i] * A[j]) + (B[i] * B[j]) != 0) {
        sum++;
        if (sum == 1000000007) {
          sum = 0;
        }
      }
    }
  }
  printf("%ld\n", sum);
  return 0;
}
