#include <bits/stdc++.h>
using namespace std;
const int N = 1010;
map<pair<pair<int, int>, pair<int, int> >, int> cnt;
map<pair<int, int>, int> slp;
int tot, n;
pair<int, int> p[N];
const int LIM = 1e4 + 1;
int gcd(int x, int y) { return (y == 0) ? x : gcd(y, x % y); }
pair<int, int> slope(const pair<int, int>& a, const pair<int, int>& b) {
  int x, y, g;
  x = a.first - b.first, y = a.second - b.second;
  if (x < 0) x = -x, y = -y;
  g = gcd(abs(x), abs(y));
  return {x / g, y / g};
}
pair<int, int> gao(const pair<int, int>& a, const pair<int, int>& b) {
  int lo = 0, hi = 2e4 + 1;
  while (lo + 1 < hi) {
    long long mid = lo + hi >> 1;
    (a.first + b.first * mid < LIM && a.first + b.first * mid > -LIM &&
     a.second + b.second * mid < LIM && a.second + b.second * mid > -LIM)
        ? lo = mid
        : hi = mid;
  }
  return {a.first + lo * b.first, a.second + lo * b.second};
}
int main() {
  scanf("%d", &n);
  for (int i = (0); i < (n); i++) scanf("%d%d", &p[i].first, &p[i].second);
  sort(p, p + n);
  for (int i = (0); i < (n); i++)
    for (int j = (i + 1); j < (n); j++) {
      pair<int, int> s = slope(p[i], p[j]);
      pair<int, int> pp = gao(p[i], s);
      if (cnt.count({pp, s})) continue;
      cnt[{pp, s}]++;
      slp[s]++;
      tot++;
    }
  long long ans = 0;
  for (auto& e : cnt) {
    pair<int, int> s = e.first.second;
    int t = tot - slp[s];
    slp[s] -= e.second;
    tot -= e.second;
    ans += t;
  }
  printf("%lld\n", ans);
  return 0;
}
