#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
double eps = 1e-8;
int x[1100000], y[1100000];
map<pair<int, int>, set<long long>> mp;
int read() {
  int v = 0, f = 1;
  char c = getchar();
  while (c < 48 || 57 < c) {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (48 <= c && c <= 57) v = (v << 3) + v + v + c - 48, c = getchar();
  return v * f;
}
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  int n = read();
  for (int i = (int)1; i <= (int)n; i++) x[i] = read(), y[i] = read();
  long long ans = 0, m = 0;
  for (int i = (int)1; i <= (int)n; i++)
    for (int j = (int)i + 1; j <= (int)n; j++) {
      int x1 = x[i], y1 = y[i], x2 = x[j], y2 = y[j];
      int a = y1 - y2, b = x1 - x2;
      int k = gcd(a, b);
      a /= k;
      b /= k;
      if (a < 0 || a == 0 && b < 0) {
        a = -a;
        b = -b;
      }
      pair<int, int> t(a, b);
      long long c = 1ll * a * x1 - 1ll * b * y1;
      if (!mp[t].count(c)) {
        m++;
        mp[t].insert(c);
        ans += m - mp[t].size();
      }
    }
  printf("%I64d\n", ans);
  return 0;
}
