#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimization("unroll-loops")
const long long int inf = 9e18;
const long double pi = 2 * acos(0.0);
using namespace std;
long long int power(long long int a, long long int n) {
  if (n == 0) {
    return 1;
  }
  long long int p = power(a, n / 2) % 1000000007;
  p = (p * p) % 1000000007;
  if (n % 2 == 1) {
    p = (p * a) % 1000000007;
  }
  return p;
}
long long int gcd(long long int a, long long int b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
const int N = 1e6 + 5;
vector<long long int> sieve(N, 0);
void si() {
  sieve[1] = 1;
  for (int i = 2; i < N; i++) {
    if (sieve[i] == 0) {
      for (int j = i; j < N; j += i) {
        sieve[j] = i;
      }
    }
  }
}
int isprime(long long int n) {
  for (long long int i = 2; i <= sqrt(n); i++) {
    if (n % i == 0) {
      return 0;
    }
  }
  return 1;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  int n;
  cin >> n;
  vector<pair<long long int, long long int> > a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i].first >> a[i].second;
  }
  map<pair<long long int, long long int>, long long int> m;
  map<pair<pair<long long int, long long int>, long double>, long long int> dis;
  sort(a.begin(), a.end());
  long long int tot = 0;
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j < n; j++) {
      long long int x1 = a[i].first, y1 = a[i].second;
      long long int x2 = a[j].first, y2 = a[j].second;
      if (x2 == x1) {
        if (dis.find(make_pair(make_pair(1000000000, 0), x1)) == dis.end()) {
          tot += 1;
          dis[make_pair(make_pair(1000000000, 0), x1)] = 1;
          m[make_pair(1000000000, 0)] += 1;
        }
        continue;
      }
      if (y2 == y1) {
        if (dis.find(make_pair(make_pair(0, 1), y1)) == dis.end()) {
          tot += 1;
          dis[make_pair(make_pair(0, 1), y1)] = 1;
          m[make_pair(0, 1)] += 1;
        }
        continue;
      }
      long long int g = gcd(y2 - y1, x2 - x1);
      long long int g1 = gcd(y1 * x2 - y2 * x1, x2 - x1);
      long long int num = (y2 - y1) / g;
      long long int den = (x2 - x1) / g;
      long long int num1 = (y1 * x2 - y2 * x1) / g1;
      long long int num2 = (x2 - x1) / g1;
      long double c = (long double)(num1) / (long double)(num2);
      if (dis.find(make_pair(make_pair(num, den), c)) == dis.end()) {
        tot += 1;
        dis[make_pair(make_pair(num, den), c)] = 1;
        m[make_pair(num, den)] += 1;
      }
    }
  }
  long long int pair = (tot * (tot - 1)) / 2;
  long long int minus = 0;
  for (auto itr : m) {
    long long int x = itr.second;
    long long int add = (x * (x - 1)) / 2;
    minus += add;
  }
  cout << pair - minus << "\n";
  return 0;
}
