#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e18, MAX = 200100, mod = 1000000007;
vector<pair<int, int>> v;
vector<pair<pair<int, int>, int>> lines;
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int gcd(int a, int b, int c) {
  int g = (a < b) ? gcd(b, a) : gcd(a, b);
  return g;
}
pair<pair<int, int>, int> getLine(pair<int, int> a, pair<int, int> b) {
  pair<pair<int, int>, int> line;
  line.first.first = b.first - a.first;
  line.first.second = b.second - a.second;
  int g = gcd(abs(line.first.first), abs(line.first.second), abs(line.second));
  if (line.first.first < 0 ||
      (line.first.first == 0 && line.first.second < 0)) {
    line.first.first = -line.first.first;
    line.first.second = -line.first.second;
  }
  line.first.first /= g;
  line.first.second /= g;
  line.second = a.second * line.first.first - a.first * line.first.second;
  return line;
}
int main() {
  int n, a, b;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a >> b;
    v.push_back({a, b});
    for (int j = 0; j < i; j++) {
      lines.push_back(getLine(v[j], v[i]));
    }
  }
  sort(lines.begin(), lines.end());
  int id = 1;
  for (int i = 1; i < lines.size(); i++) {
    if (lines[i] != lines[i - 1]) {
      lines[id] = lines[i];
      id++;
    }
  }
  for (int i = lines.size() - 1; i >= id; i--) lines.pop_back();
  long long cnt = 0;
  long long res = 0;
  int i = 0;
  while (i < lines.size()) {
    long long cur_count = 1;
    while (i + 1 < lines.size() && lines[i].first == lines[i + 1].first) {
      i++;
      cur_count++;
    }
    res += (cur_count * cnt);
    cnt += cur_count;
    i++;
  }
  cout << res << endl;
  return 0;
}
