#include <bits/stdc++.h>
using namespace std;
int X[1111];
int Y[1111];
long long GetGcd(long long a, long long b) {
  while (b != 0) {
    long long t = b;
    b = a % b;
    a = t;
  }
  return a;
}
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> X[i] >> Y[i];
  }
  map<pair<int, int>, set<int>> counts;
  for (int i = 1; i <= n; i++)
    for (int j = i + 1; j <= n; j++) {
      long long numer = Y[i] - Y[j];
      long long denom = X[i] - X[j];
      long long g = GetGcd(numer, denom);
      numer /= g;
      denom /= g;
      if (denom < 0) {
        numer = -numer;
        denom = -denom;
      } else if (denom == 0 && numer < 0) {
        numer = -numer;
      }
      long long C = X[i] * numer - Y[i] * denom;
      counts[{numer, denom}].insert(C);
    }
  long long total_wires = 0;
  for (auto x : counts) {
    total_wires += x.second.size();
  }
  long long ans = 0;
  for (auto x : counts) {
    ans += (long long)x.second.size() * (total_wires - x.second.size());
  }
  cout << ans / 2 << endl;
}
