#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e3 + 10;
int x[maxn], y[maxn], n;
int gcd(int a, int b) { return !b ? a : gcd(b, a % b); }
map<pair<int, int>, int> mp, tp;
set<int> line[maxn * maxn];
void solve(int &x, int &y) {
  if (!x) x = 1;
  if (!y) y = 1;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d%d", &x[i], &y[i]);
  int tot = 0, cnt = 0;
  for (int i = 1; i <= n; i++) {
    for (int j = i + 1; j <= n; j++) {
      int dy = y[j] - y[i], dx = x[j] - x[i];
      int g = gcd(dx, dy);
      pair<int, int> tmp, cur;
      if (dx == 0) {
        tmp = pair<int, int>(0, 1);
        cur = pair<int, int>(x[i], x[i]);
      } else if (dy == 0) {
        tmp = pair<int, int>(1, 0);
        cur = pair<int, int>(y[i], y[i]);
      } else {
        tmp = pair<int, int>(dx / g, dy / g);
        int p = x[j] * y[i] - y[j] * x[i];
        int g2 = gcd(p, dx);
        cur = pair<int, int>(p / g2, dx / g2);
      }
      if (!tp[cur]) tp[cur] = ++cnt;
      if (!mp[tmp]) mp[tmp] = ++tot;
      line[mp[tmp]].insert(tp[cur]);
    }
  }
  long long ans = 0;
  long long sum = 0;
  for (int i = 1; i <= tot; i++) {
    sum += line[i].size();
    ans -= 1ll * line[i].size() * (line[i].size() - 1) / 2;
  }
  ans += 1ll * sum * (sum - 1) / 2;
  cout << ans << endl;
  return 0;
}
