#include <bits/stdc++.h>
using namespace std;
int n, cnt, lin[1000005], tot;
long long ans;
struct node {
  int x, y, z;
} line[1000005], pio[1005];
int gcd(int a, int b) { return a == 0 ? b : gcd(b % a, a); }
bool cmp(node a, node b) {
  return a.y * b.x == b.y * a.x ? a.z < b.z : a.y * b.x < b.y * a.x;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d%d", &pio[i].x, &pio[i].y);
  for (int i = 1; i <= n; i++)
    for (int j = i + 1; j <= n; j++) {
      line[++cnt].x = pio[j].y - pio[i].y;
      line[cnt].y = pio[i].x - pio[j].x;
      line[cnt].z = pio[j].x * pio[i].y - pio[j].y * pio[i].x;
      int k = gcd(gcd(line[cnt].x, line[cnt].y), gcd(line[cnt].y, line[cnt].z));
      line[cnt].x /= k;
      line[cnt].y /= k;
      line[cnt].z /= k;
      if (line[cnt].x < 0)
        line[cnt].x = -line[cnt].x, line[cnt].y = -line[cnt].y,
        line[cnt].z = -line[cnt].z;
    }
  sort(line + 1, line + 1 + cnt, cmp);
  for (int i = 1; i <= cnt; i++) {
    if (i == 1 || line[i].x * line[i - 1].y != line[i - 1].x * line[i].y) tot++;
    if (i == 1 || line[i].x * line[i - 1].y != line[i - 1].x * line[i].y ||
        line[i].z != line[i - 1].z)
      lin[tot]++, ans++;
  }
  ans = ans * (ans - 1);
  for (int i = 1; i <= cnt; i++) ans -= lin[i] * (lin[i] - 1);
  printf("%I64d\n", ans / 2);
}
