#include <bits/stdc++.h>
using namespace std;
long long int gcd(long long int m, long long int n) {
  while (n != 0) {
    long long int t = m % n;
    m = n;
    n = t;
  }
  return m;
}
long long int total = 0;
map<pair<long long int, long long int>, set<long long int> > line;
int n;
int x[1000], y[1000];
int main() {
  long long int ans = 0;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d %d", &x[i], &y[i]);
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j < n; j++) {
      long long int a, b, c, gcdv;
      a = y[j] - y[i];
      b = x[j] - x[i];
      gcdv = gcd(a, b);
      a /= gcdv;
      b /= gcdv;
      if (a < 0) a *= -1, b *= -1;
      if (a == 0 && b < 0) b *= -1;
      c = a * x[i] - b * y[i];
      if (line[{a, b}].count(c) == 0) {
        line[{a, b}].insert(c);
        total++;
      }
    }
  }
  map<pair<long long int, long long int>, set<long long int> >::iterator it =
      line.begin();
  while (it != line.end()) {
    long long int size = it->second.size();
    ans += (total - size) * size;
    it++;
  }
  printf("%lld\n", ans / 2);
  return 0;
}
