#include <bits/stdc++.h>
using namespace std;
double x[1003];
double y[1003];
map<double, int> mop;
map<pair<double, double>, int> mpp;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  double yy;
  long long int tot = 0, uniq = 0;
  for (int i = 0; i < n; i++) {
    cin >> x[i] >> y[i];
  }
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j < n; j++) {
      double m = (y[j] - y[i]) / (x[j] - x[i]);
      if ((x[j] - x[i]) == 0) {
        m = INT_MAX;
        yy = x[i];
      } else {
        yy = y[i] - (m * x[i]);
      }
      if (mpp.find({m, yy}) == mpp.end()) {
        mpp[{m, yy}] = 1;
      }
    }
  }
  for (std::map<pair<double, double>, int>::iterator it = mpp.begin();
       it != mpp.end(); ++it) {
    double m = it->first.first;
    if (mop.find(m) == mop.end()) {
      mop[m] = 1;
      tot++;
      uniq++;
    } else {
      mop[m]++;
      tot++;
    }
  }
  long long int ans = uniq * (uniq - 1) / 2;
  for (std::map<double, int>::iterator it = mop.begin(); it != mop.end();
       ++it) {
    int num = it->second;
    long long int p = 0;
    double m = it->first;
    ans = ans + max(p, (tot - num) * (num - 1));
    tot = tot - num + 1;
  }
  cout << ans;
  return (0);
}
