#include <bits/stdc++.h>
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
using namespace std;
int main() {
  long long n, x[1005], y[1005], i, j, dy, dx, answer = 0, total = 0;
  map<pair<long long, long long>, set<long long> > mp;
  map<pair<long long, long long>, set<long long> >::iterator itr;
  pair<long long, long long> temp;
  scanf("%lld", &n);
  for (i = 0; i < n; i++) {
    scanf("%lld %lld", &x[i], &y[i]);
  }
  for (i = 0; i < n - 1; i++) {
    for (j = i + 1; j < n; j++) {
      dy = y[i] - y[j];
      dx = x[i] - x[j];
      temp.first = dx / gcd(dy, dx);
      temp.second = dy / gcd(dy, dx);
      mp[temp].insert(temp.first * y[i] - temp.second * x[i]);
    }
  }
  for (itr = mp.begin(); itr != mp.end(); ++itr) {
    answer += total * itr->second.size();
    total += itr->second.size();
  }
  printf("%lld\n", answer);
  return 0;
}
