#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL), cout.tie(NULL);
  long long n;
  cin >> n;
  long long i, j, k, z;
  double x, y, m, c, x1, x2, y1, y2;
  vector<pair<double, double> > pts, sl;
  for (i = 0; i < n; i++) {
    cin >> x >> y;
    pts.push_back(make_pair(x, y));
  }
  k = 0;
  for (i = 0; i < n; i++) {
    x1 = pts[i].first;
    y1 = pts[i].second;
    for (j = i + 1; j < n; j++) {
      x2 = pts[j].first;
      y2 = pts[j].second;
      if (x1 - x2 == 0)
        m = 1000000007;
      else if (y1 == y2)
        m = 0;
      else
        m = (y1 - y2) * 1.0 / (x1 - x2);
      if (m == 1000000007)
        c = x1;
      else
        c = y1 - m * x1;
      sl.push_back(make_pair(m, c));
      k++;
    }
  }
  sort(sl.begin(), sl.end());
  j = 0;
  long long r;
  vector<long long> yo;
  vector<double> po;
  for (i = 0; i < k; i++) {
    m = sl[i].first;
    c = sl[i].second;
    if (i == 0) {
      j++;
      po.push_back(c);
      continue;
    }
    if (m == sl[i - 1].first) {
      j++;
      po.push_back(c);
    } else {
      sort(po.begin(), po.end());
      r = 1;
      for (z = 1; z < j; z++) {
        if (po[z] != po[z - 1]) r++;
      }
      yo.push_back(r);
      po.clear();
      po.push_back(c);
      j = 1;
    }
  }
  sort(po.begin(), po.end());
  r = 1;
  for (z = 1; z < j; z++) {
    if (po[z] != po[z - 1]) r++;
  }
  yo.push_back(r);
  long long sum = 0, ans = 0;
  for (auto qr : yo) {
    sum += qr;
  }
  for (auto qr : yo) {
    ans += (qr) * (sum - qr);
  }
  cout << ans / 2;
  return 0;
}
