#include <bits/stdc++.h>
using namespace std;
int n, n_dt(0), dem(0);
pair<int, int> a[1111];
pair<double, double> dt[1111 * 1111];
int f[1111 * 1111];
long long res(0);
bool comp(pair<double, double> a, pair<double, double> b) {
  if (abs(a.first - b.first) < 0.00000000001) {
    return a.second < b.second;
  }
  return a.first < b.first;
}
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i].first >> a[i].second;
  }
  for (int i = 1; i < n; i++) {
    for (int j = i + 1; j <= n; j++) {
      int tx = a[i].first - a[j].first;
      int ty = a[i].second - a[j].second;
      if (tx < 0) {
        tx = -tx;
        ty = -ty;
      }
      int ma = i;
      if (a[j].second > a[i].second) {
        ma = j;
      }
      double th;
      if (tx == 0)
        th = a[ma].first;
      else if (ty == 0)
        th = a[ma].second;
      else
        th = double(a[ma].first) +
             double(a[ma].second) / double(-ty) * double(tx);
      ++n_dt;
      if (ty == 0)
        dt[n_dt].first = 1000000000;
      else
        dt[n_dt].first = double(tx) / double(ty);
      dt[n_dt].second = th;
    }
  }
  sort(dt + 1, dt + n_dt + 1, comp);
  dt[0].first = 1000000000 + 1;
  for (int i = 1; i <= n_dt; i++) {
    if (abs(dt[i].first - dt[i - 1].first) < 0.00000000001) {
      if (abs(dt[i].second - dt[i - 1].second) < 0.00000000001) {
        f[i] = f[i - 1];
      } else {
        f[i] = f[i - 1] + 1;
        res += dem - f[i];
        dem++;
      }
    } else {
      res += dem;
      dem++;
    }
  }
  cout << res;
  return 0;
}
