#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n, i, j;
  cin >> n;
  int x[n], y[n];
  for (i = 0; i < n; ++i) {
    cin >> x[i] >> y[i];
  }
  long long int c1 = 0, c2 = 0;
  std::map<pair<double, double>, int> d;
  std::map<double, int> k, pa;
  for (i = 0; i < n - 1; ++i) {
    for (j = i + 1; j < n; ++j) {
      double p, c;
      if (x[i] != x[j]) {
        p = (y[j] - y[i]) * 1.000 / (x[j] - x[i]);
        c = (x[j] * y[i] - x[i] * y[j]) * 1.000 / (x[j] - x[i]);
        if (!d[make_pair(p, c)]) {
          d[make_pair(p, c)]++;
          c1++;
          pa[p]++;
        }
      } else {
        if (!k[x[i]]) {
          k[x[i]]++;
          c2++;
        }
      }
    }
  }
  long long int ans = 0;
  map<double, int>::iterator it;
  for (it = pa.begin(); it != pa.end(); ++it) {
    ans += (c1 - (it->second)) * (it->second);
  }
  ans = ans / 2;
  for (it = pa.begin(); it != pa.end(); ++it) {
    ans += c2 * (it->second);
  }
  cout << ans << "\n";
  return 0;
}
