#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007;
const long long MAX = 4005;
const double PI = 3.1415926;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  pair<long long, long long> arr[n];
  for (int i = 0; i < n; ++i) {
    cin >> arr[i].first >> arr[i].second;
  }
  map<double, long long> m1;
  map<double, long long>::iterator itr;
  long long total = 0;
  for (int i = 0; i < n; ++i) {
    map<double, long long> m2;
    for (int j = i + 1; j < n; ++j) {
      double slope;
      if (arr[i].first == arr[j].first)
        slope = MOD;
      else
        slope = (1.0 * (arr[i].second - arr[j].second) /
                 (arr[i].first - arr[j].first));
      if (m2.find(slope) == m2.end())
        m2[slope] = 1;
      else
        m2[slope]++;
    }
    for (itr = m2.begin(); itr != m2.end(); ++itr) {
      if (itr->second > 1) continue;
      if (m1.find(itr->first) == m1.end())
        m1[itr->first] = 1;
      else
        m1[itr->first]++;
      total++;
    }
  }
  long long ans = 0;
  for (itr = m1.begin(); itr != m1.end(); ++itr) {
    ans += (total - itr->second) * itr->second;
    total -= itr->second;
  }
  cout << ans << endl;
  return 0;
}
