#include <bits/stdc++.h>
using namespace std;
int n, x[1010], y[1010];
set<pair<pair<int, int>, int>> lines;
map<pair<int, int>, int> S;
long long int total, q;
int gcd(int a, int b) { return (a == 0) ? b : gcd(b % a, a); }
int main() {
  scanf("%d", &n);
  total = 0;
  q = 0;
  for (int i = 0; i < n; i++) scanf("%d%d", &x[i], &y[i]);
  for (int i = 0; i < n; i++)
    for (int j = i + 1; j < n; j++) {
      int a = y[j] - y[i];
      int b = x[i] - x[j];
      int c = x[j] * y[i] - x[i] * y[j];
      int g = gcd(abs(a), gcd(abs(b), abs(c)));
      a /= g;
      b /= g;
      c /= g;
      if (a < 0) {
        a *= -1;
        b *= -1;
        c *= -1;
      }
      if (a == 0 && b < 0) {
        b *= -1;
        c *= -1;
      }
      lines.emplace(pair<int, int>(a, b), c);
    };
  for (auto it = lines.begin(); it != lines.end(); it++) {
    pair<int, int> p = it->first;
    int a = p.first;
    int b = p.second;
    int g = gcd(abs(a), abs(b));
    a /= g;
    b /= g;
    S[pair<int, int>(a, b)]++;
    q++;
  }
  while (!S.empty()) {
    auto it = S.begin();
    q -= it->second;
    total += q * it->second;
    S.erase(it);
  }
  printf("%lld\n", total);
}
