#include <bits/stdc++.h>
using namespace std;
int mod = 1e9 + 7;
const int N = 1e3 + 5;
double x[N], y[N];
map<pair<double, double>, int> mp;
map<double, int> mp1;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int tt = 1;
  while (tt--) {
    int n;
    cin >> n;
    for (int i = 0; i < n; ++i) {
      cin >> x[i] >> y[i];
    }
    for (int i = 0; i < n; ++i) {
      for (int j = i + 1; j < n; ++j) {
        double slope = (y[j] - y[i]) / (x[j] - x[i]);
        if ((x[j] - x[i]) == 0) {
          slope = INT_MAX;
          double intercept = x[i];
          if (!mp.count(make_pair(slope, intercept)))
            mp[make_pair(slope, intercept)] = 1;
        } else {
          double intercept = y[i] - (slope * x[i]);
          if (!mp.count(make_pair(slope, intercept)))
            mp[make_pair(slope, intercept)] = 1;
        }
      }
    }
    long long total = 0, unique = 0;
    for (map<pair<double, double>, int>::iterator it = mp.begin();
         it != mp.end(); ++it) {
      double temp = it->first.first;
      if (!mp1.count(temp)) {
        mp1[temp] = 1;
        unique++;
        total++;
      } else {
        mp1[temp]++;
        total++;
      }
    }
    long long ans = unique * (unique - 1) / 2;
    for (map<double, int>::iterator it = mp1.begin(); it != mp1.end(); ++it) {
      int temp = it->second;
      ans += max(0ll, (total - temp) * (temp - 1));
      total -= (temp - 1);
    }
    cout << ans << "\n";
  }
  return 0;
}
