#include <bits/stdc++.h>
using namespace std;
const int maxn = 1001;
struct vec {
  int x, y;
  vec() {}
  vec(int x, int y) : x(x), y(y) {}
  vec operator-(const vec &v) const { return vec(x - v.x, y - v.y); }
  int operator*(const vec &v) const { return x * v.y - y * v.x; }
};
struct line {
  vec p, v;
  line() {}
  line(vec p, vec v) : p(p), v(v) {}
  bool operator<(const line &l) const {
    if (v * l.v != 0) return v * l.v > 0;
    return v * (l.p - p) > 0;
  }
  bool operator==(const line &l) const {
    return v * l.v == 0 && v * (l.p - p) == 0;
  }
};
int x[maxn], y[maxn];
line l[maxn * maxn];
int n;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d%d", &x[i], &y[i]);
  }
  int cnt = 0;
  for (int i = 1; i <= n; i++) {
    for (int j = i + 1; j <= n; j++) {
      int dx = x[i] - x[j];
      int dy = y[i] - y[j];
      if (dx < 0) dx = -dx, dy = -dy;
      if (dx == 0 && dy < 0) dy = -dy;
      l[++cnt] = line(vec(x[i], y[i]), vec(dx, dy));
    }
  }
  sort(l + 1, l + 1 + cnt);
  cnt = unique(l + 1, l + 1 + cnt) - l - 1;
  long long ans = (long long)cnt * (cnt - 1) / 2;
  for (int i = 1; i <= cnt; i++) {
    int r = i;
    while (r < cnt && l[r + 1].v * l[i].v == 0) r++;
    ans -= (long long)(r - i + 1) * (r - i) / 2;
    i = r;
  }
  printf("%lld", ans);
  return 0;
}
