#include <bits/stdc++.h>
using namespace std;
struct s {
  int a, b, c;
};
bool f(s x, s y) {
  if (x.a != y.a) return x.a < y.a;
  if (x.b != y.b) return x.b < y.b;
  if (x.c != y.c) return x.c < y.c;
  return false;
}
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n;
  cin >> n;
  pair<int, int> p[n];
  for (int i = 0; i < n; i++) {
    cin >> p[i].first >> p[i].second;
  }
  vector<s> v;
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j < n; j++) {
      int dy = p[j].second - p[i].second;
      int dx = p[j].first - p[i].first;
      v.push_back({dy, -dx, dx * p[i].second - dy * p[i].first});
    }
  }
  for (int i = 0; i < v.size(); i++) {
    int g = gcd(abs(v[i].a), abs(v[i].b));
    g = gcd(g, abs(v[i].c));
    v[i] = {v[i].a / g, v[i].b / g, v[i].c / g};
    if (v[i].a < 0) {
      v[i].a *= -1;
      v[i].b *= -1;
      v[i].c *= -1;
    }
    if (v[i].a == 0 && v[i].b < 0) {
      v[i].b *= -1;
      v[i].c *= -1;
    }
  }
  sort(v.begin(), v.end(), f);
  vector<s> v1;
  for (int i = 0; i < v.size(); i++) {
    v1.push_back(v[i]);
    s x = v[i];
    while (i < v.size()) {
      if (v[i].a != x.a || v[i].b != x.b || v[i].c != x.c) break;
      i++;
    }
    i--;
  }
  long long ans = v1.size();
  ans = (ans * (ans - 1)) / 2;
  for (int i = 0; i < v1.size(); i++) {
    long long l = 0;
    int a = v1[i].a, b = v1[i].b;
    while (i < v1.size()) {
      if (v1[i].a != a || v1[i].b != b) break;
      l++;
      i++;
    }
    i--;
    ans -= (l * (l - 1)) / 2;
  }
  cout << ans;
}
