#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long h(long long a, long long b) {
  const long long g = gcd(a, b);
  a /= g, b /= g;
  if (b < 0 || (b == 0 && a < 0)) a = -a, b = -b;
  return a << 32 | b;
}
long long C2(long long x) { return x * (x - 1) / 2; }
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0), cout.tie(0);
  map<long long, set<long long>> mp;
  int n;
  cin >> n;
  vector<pair<int, int>> pts(n);
  for (auto &&p : pts) cin >> p.first >> p.second;
  for (auto &&p1 : pts)
    for (auto &&p2 : pts)
      if (p1 != p2) {
        const long long dx = p1.first - p2.first;
        const long long dy = p1.second - p2.second;
        set<long long> &s = mp[h(dx, dy)];
        assert(dx || dy);
        if (dx)
          s.insert(h(p1.second * dx - p1.first * dy, dx));
        else
          s.insert(h(p1.first * dy - p1.second * dx, dy));
      }
  long long total = 0, ans = 0;
  ;
  for (auto &&e : mp) {
    ans -= C2(e.second.size());
    total += e.second.size();
  }
  ans += C2(total);
  cout << ans;
  return 0;
}
