#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int n;
  cin >> n;
  vector<vector<double>> V(n, vector<double>(2));
  map<pair<double, double>, int> mp;
  for (int i = 0; i < n; i++) {
    cin >> V[i][0] >> V[i][1];
  }
  int sum = 0;
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j < n; j++) {
      if (V[i][0] == V[j][0]) {
        mp[make_pair(INT_MAX, V[i][0])] = 1;
      } else {
        double z = (V[j][1] - V[i][1]) / (V[j][0] - V[i][0]);
        double tt = V[j][0] - (V[j][1] / z);
        double ff = z * (-V[j][0]) + V[j][1];
        if (V[j][1] == V[i][1]) {
          mp[make_pair(z, ff)] = 1;
        } else {
          mp[make_pair(z, tt)] = 1;
        }
      }
    }
  }
  map<double, int> mp1;
  sum = mp.size();
  for (auto it = mp.begin(); it != mp.end(); it++) {
    pair<double, double> PT = it->first;
    mp1[PT.first] += 1;
  }
  int ans = 0;
  for (auto it = mp1.begin(); it != mp1.end(); it++) {
    sum -= it->second;
    ans += (it->second * sum);
  }
  cout << ans << endl;
  return 0;
}
