#include <bits/stdc++.h>
using namespace std;
const int N = 1010;
int n;
int x[N], y[N];
int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); }
struct line {
  int a, b, c;
  line() {}
  line(int aa, int bb, int cc) {
    a = aa;
    b = bb;
    c = cc;
    int g = gcd(a, gcd(b, c));
    if (g != 0) {
      a /= g;
      b /= g;
      c /= g;
    }
    if (a < 0) {
      a *= -1;
      b *= -1;
      c *= -1;
    }
  }
  bool operator<(const line& y) const {
    if (a != y.a) return a < y.a;
    if (b != y.b) return b < y.b;
    return c < y.c;
  }
  bool operator==(const line& y) const { return !(*this < y) && !(y < *this); }
};
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> x[i] >> y[i];
  }
  vector<line> z(n * (n - 1) / 2);
  int ptr = 0;
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j < n; j++) {
      int dx = x[i] - x[j];
      int dy = y[j] - y[i];
      int a = -dy;
      int b = -dx;
      int c = -(a * x[i] + b * y[i]);
      z[ptr++] = line(a, b, c);
    }
  }
  sort(z.begin(), z.end());
  z.resize(unique(z.begin(), z.end()) - z.begin());
  long long numL = z.size();
  numL = (numL) * (numL - 1) / 2;
  long long parallel = 0;
  vector<pair<int, int>> v(z.size());
  for (int i = 0; i < z.size(); i++) {
    int x = z[i].a;
    int y = z[i].b;
    int g = gcd(x, y);
    if (g != 0) {
      x /= g;
      y /= g;
    }
    if (x < 0) {
      x *= -1;
      y *= -1;
    }
    v[i] = {x, y};
  }
  sort(v.begin(), v.end());
  for (int i = 0, j = 0; i < v.size();) {
    while (j + 1 < v.size() && v[j + 1] == v[i]) j++;
    parallel += (j - i + 1) * 1ll * (j - i) / 2;
    i = j + 1;
  }
  numL -= parallel;
  cout << numL << endl;
  return 0;
}
