#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e3 + 10;
struct Line {
  pair<int, int> lk;
  double lb;
  bool operator<(const Line &x) const {
    if (lk != x.lk) return lk < x.lk;
    return lb < x.lb;
  }
};
map<pair<int, int>, int> mp;
map<Line, int> mp1;
int n, rcnt;
long long tot;
pair<int, int> rec[MAXN * MAXN];
pair<int, int> p[MAXN];
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
Line go(pair<int, int> pi, pair<int, int> pj) {
  Line ret;
  int dy = pi.second - pj.second;
  int dx = pi.first - pj.first;
  if (dy < 0) {
    dy *= -1;
    dx *= -1;
  }
  int ady = abs(dy);
  int adx = abs(dx);
  if (dy == 0) {
    ret.lk = make_pair(0, 0);
    ret.lb = pi.second;
    return ret;
  }
  if (dx == 0) {
    ret.lk = make_pair(-11111, -11111);
    ret.lb = pj.first;
    return ret;
  }
  int g = gcd(ady, adx);
  ret.lk = make_pair(dy / g, dx / g);
  ret.lb = (double)pi.second - (double)ret.lk.first * pi.first / ret.lk.second;
  return ret;
}
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> p[i].first >> p[i].second;
    for (int j = 0; j < i; j++) {
      Line l = go(p[i], p[j]);
      if (mp1.count(l)) {
        continue;
      }
      mp1[l] = 1;
      pair<int, int> k = l.lk;
      if (mp.count(k) == 0) {
        rec[rcnt++] = k;
        mp[k] = 1;
        tot++;
      } else {
        mp[k]++;
        tot++;
      }
    }
  }
  long long ans = 0;
  for (int i = 0; i < rcnt; i++) {
    long long cur = mp[rec[i]];
    ans += cur * (tot - cur);
  }
  cout << ans / 2 << endl;
  return 0;
}
