#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (a < b) swap(a, b);
  if (b == 0) return a;
  if (a % b == 0) return b;
  return gcd(b, a % b);
}
set<pair<pair<long long, long long>, pair<long long, long long> > > st;
long long x[1005], y[1005];
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> x[i] >> y[i];
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j < i; j++) {
      long long dx = x[j] - x[i];
      long long dy = y[j] - y[i];
      if (dx < 0) {
        dx *= -1;
        dy *= -1;
      }
      if (dx == 0) dy = abs(dy);
      long long GCD = gcd(dx, abs(dy));
      dx /= GCD;
      dy /= GCD;
      pair<long long, long long> sub;
      if (dx != 0) {
        long long bunbo = dx;
        long long bunsi = y[i] * dx - x[i] * dy;
        if (bunbo < 0) {
          bunbo *= -1;
          bunsi *= -1;
        }
        GCD = gcd(abs(bunbo), abs(bunsi));
        bunbo /= GCD;
        bunsi /= GCD;
        sub = {bunsi, bunbo};
      } else {
        sub = {x[i], 0};
      }
      st.insert({{dx, dy}, sub});
    }
  }
  long long ans = 0;
  long long before = 0;
  long long now = 0;
  pair<long long, long long> nowm = {0, 0};
  while (!st.empty()) {
    auto itr = st.begin();
    pair<pair<long long, long long>, pair<long long, long long> > nowcheck =
        *itr;
    st.erase(itr);
    if (nowcheck.first == nowm) {
      ans += before;
      now++;
    } else {
      before += now;
      ans += before;
      now = 1;
      nowm = nowcheck.first;
    }
  }
  cout << ans << endl;
  return 0;
}
