#include <bits/stdc++.h>
const int N = 5e5 + 10, M = 1e7 + 10;
const long long mod = 1e9 + 7;
using namespace std;
map<pair<int, int>, set<int>> mp;
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
int x[N], y[N];
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) scanf("%d%d", &x[i], &y[i]);
  long long cnt = 0, res = 0;
  for (int i = 1; i < n; i++) {
    for (int j = i + 1; j <= n; j++) {
      int a = y[i] - y[j], b = x[i] - x[j];
      int c = y[i] * x[j] - y[j] * x[i];
      int g = gcd(a, b);
      a /= g;
      b /= g;
      c /= g;
      if (a < 0 || (a == 0 && b < 0)) a = -a, b = -b;
      pair<int, int> p = make_pair(a, b);
      if (mp[p].find(c) == mp[p].end()) {
        cnt++;
        mp[p].insert(c);
        res += cnt - mp[p].size();
      }
    }
  }
  cout << res << endl;
  return 0;
}
