#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007;
long long exp(long long n, long long m) {
  long long a = 1;
  while (m > 0) {
    if (m & 1) a = (a * n % MOD) % MOD;
    m /= 2;
    n = (n * n) % MOD;
  }
  return a % MOD;
}
long long factorial_mod(long long n) {
  long long f = 1;
  for (int i = 0; i < n; i++) {
    f = (f * (i + 1)) % MOD;
  }
  return f;
}
long long gcd(long long x, long long y) { return y ? gcd(y, x % y) : x; }
long long lcm(long long a, long long b) {
  long long grr = gcd(a, b);
  long long lcc = (a * b) / grr;
  return lcc;
}
vector<long long> prime_factors(long long n) {
  vector<long long> v;
  while (n % 2 == 0) {
    v.push_back(2);
    n = n / 2;
  }
  for (int i = 3; i <= sqrt(n); i = i + 2) {
    while (n % i == 0) {
      v.push_back(i);
      n = n / i;
    }
  }
  if (n > 2) v.push_back(n);
  return v;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t = 1;
  while (t--) {
    int n;
    cin >> n;
    int x[n], y[n];
    for (int i = 0; i < n; i++) {
      cin >> x[i] >> y[i];
    }
    map<tuple<int, int, int>, int> m;
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < n; j++) {
        if (j != i) {
          int a = x[j] - x[i], b = y[j] - y[i], c = (x[j] * y[i] - y[j] * x[i]);
          int g = gcd(a, gcd(b, c));
          a = a / g;
          b = b / g;
          c = c / g;
          tuple<int, int, int> t;
          if (a < 0)
            t = make_tuple(-a, -b, -c);
          else if (a == 0) {
            b < 0 ? t = make_tuple(-a, -b, -c) : t = make_tuple(a, b, c);
          } else {
            t = make_tuple(a, b, c);
          }
          m[t]++;
        }
      }
    }
    long long cnt = m.size();
    long long para = 0;
    map<pair<int, int>, int> m1;
    for (auto i : m) {
      m1[make_pair(get<0>(i.first), get<1>(i.first))]++;
    }
    for (auto i : m1) {
      para += (i.second * (i.second - 1)) / 2;
    }
    cnt == 1 ? cout << 0 << "\n" : cout << (cnt * (cnt - 1)) / 2 - para << "\n";
  }
  return 0;
}
