#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, j, k, n;
  cin >> n;
  unsigned long *ncr = new unsigned long[n + 2];
  double *a = new double[n + 1];
  double *b = new double[n + 1];
  for (i = 0; i < n; i++) {
    cin >> a[i] >> b[i];
  }
  int nminus = n - 1;
  ncr[0] = 0;
  ncr[1] = nminus;
  ncr[2] = nminus * (nminus - 1) / 2;
  for (i = 3; i < n; i++) {
    ncr[i] = ncr[i - 1] / i * (nminus - i + 1) + ncr[i - 1];
  }
  int OK;
  unsigned long ans = 0;
  for (i = 0; i < n; i++) {
    OK = 1;
    for (j = i + 1; j < n; j++) {
      if (a[i] * a[j] + b[i] * b[j] != 0) {
        OK++;
      }
    }
    OK--;
    ans = ans + ncr[OK] + 1;
  }
  cout << ans << endl;
  return 0;
}
