#include <bits/stdc++.h>
using namespace std;
using ll = int;
using rll = long long;
using vl = vector<ll>;
using vs = vector<string>;
using vvl = vector<vl>;
using pll = pair<ll, ll>;
using vb = vector<bool>;
const ll oo = 0x3f3f3f3f3f3f3f3fLL;
const double eps = 1e-9;
ll gcd(ll a, ll b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
pll get(pll& a, pll& b) {
  ll dx = a.first - b.first;
  ll dy = a.second - b.second;
  ll g = gcd(dx, dy);
  dx /= g;
  dy /= g;
  if (dx < 0 || (dx == 0 && dy < 0)) {
    dx *= -1;
    dy *= -1;
  }
  return make_pair(dx, dy);
}
using Line = pair<pll, pll>;
pll getY(pll& a, pll& u) {
  ll x = u.first * a.second - a.first * u.second;
  ll y = u.first;
  if (y != 0) {
    ll g = gcd(x, y);
    x /= g;
    y /= g;
    if (x < 0 || (x == 0 && y < 0)) {
      x *= -1;
      y *= -1;
    }
  } else {
    x = a.first;
  }
  return make_pair(x, y);
}
int main() {
  ll n;
  cin >> n;
  vector<pll> v(n);
  for (int i = (0); i < (n); i++) {
    cin >> v[i].first >> v[i].second;
  }
  set<Line> counter;
  for (int i = (0); i < (n); i++) {
    for (int j = (i + 1); j < (n); j++) {
      pll p = get(v[i], v[j]);
      Line l{p, getY(v[i], p)};
      counter.insert(l);
    }
  }
  rll counts = 0;
  rll lines = 0;
  rll secondlast = 0;
  auto it = counter.begin();
  pll last = make_pair(-1ll, -1ll);
  while (it != counter.end()) {
    if (it->first == last) {
      counts += secondlast;
    } else {
      secondlast = lines;
      counts += lines;
    }
    lines++;
    last = it->first;
    it++;
  }
  cout << counts << endl;
}
