#include <bits/stdc++.h>
using namespace std;
set<tuple<long long, long long, long long>> T;
map<pair<long long, long long>, long long> cnt;
vector<pair<long long, long long>> P;
long long GCD(long long a, long long b) {
  for (; b; a %= b, swap(a, b))
    ;
  return a;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ((void)0);
  ((void)0);
  ((void)0);
  int N;
  long long ans = 0;
  cin >> N;
  P.resize(N);
  for (int i = 0; i < N; i++) {
    cin >> P[i].first >> P[i].second;
    for (int j = 0; j < i; j++) {
      long long a = P[i].second - P[j].second, b = -P[i].first + P[j].first,
                c = P[i].first * P[j].second - P[j].first * P[i].second, g;
      if (a < 0 || a == 0 && b < 0) a *= -1, b *= -1, c *= -1;
      g = GCD(a, GCD(abs(b), abs(c)));
      if (T.find({a /= g, b /= g, c /= g}) != T.end()) continue;
      T.insert({a, b, c});
      g = GCD(a, abs(b));
      ans++;
      cnt[{a, b}]++;
    }
  }
  ans = ans * (ans - 1) / 2;
  for (auto [a, b] : cnt) ans -= b * (b - 1) / 2;
  cout << ans << '\n';
  return 0;
}
