#include <bits/stdc++.h>
using namespace std;
char _;
mt19937 g1(time(0));
int randint(int a, int b) { return uniform_int_distribution<int>(a, b)(g1); }
long long randlong(long long a, long long b) {
  return uniform_int_distribution<long long>(a, b)(g1);
}
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
long long lcm(long long a, long long b) { return a * b / gcd(a, b); }
long long fpow(long long b, long long exp, long long mod) {
  if (exp == 0) return 1;
  long long t = fpow(b, exp / 2, mod);
  if (exp & 1) return t * t % mod * b % mod;
  return t * t % mod;
}
long long divmod(long long i, long long j, long long mod) {
  i %= mod, j %= mod;
  return i * fpow(j, mod - 2, mod) % mod;
}
int len;
long long res, tot, other;
double lst;
map<double, int> cnt;
map<pair<double, double>, int> cnt2;
vector<double> v;
vector<pair<double, double>> v2;
pair<int, int> points[1000005];
vector<int> hori, vert;
int main() {
  scanf("%d", &len);
  for (int i = 1; i <= len; i++)
    scanf(" %d %d", &points[i].first, &points[i].second);
  for (int i = 1; i <= len; i++) {
    for (int k = i + 1; k <= len; k++) {
      if (points[k].second == points[i].second) {
        hori.push_back(points[k].second);
        continue;
      } else if (points[k].first == points[i].first) {
        vert.push_back(points[k].first);
        continue;
      }
      double slope = (double)(points[k].second - points[i].second) /
                     (points[k].first - points[i].first);
      double b = (double)points[k].second - slope * points[k].first;
      v.push_back(slope);
      cnt[slope]++;
      v2.push_back(make_pair(slope, b));
      cnt2[make_pair(slope, b)]++;
    }
  }
  sort(hori.begin(), hori.end());
  hori.erase(unique(hori.begin(), hori.end()), hori.end());
  sort(vert.begin(), vert.end());
  vert.erase(unique(vert.begin(), vert.end()), vert.end());
  res += hori.size() * vert.size();
  sort(v2.begin(), v2.end());
  v2.erase(unique(v2.begin(), v2.end()), v2.end());
  pair<double, double> lst2 = (v2.size() ? v2[0] : make_pair(1.0, 1.0));
  for (int i = 1; i < v2.size(); i++) {
    if (abs(v2[i].first - lst2.first) <= 1e-9 &&
        abs(v2[i].second - lst2.second) <= 1e-9) {
      cnt2[lst2] += cnt2[v2[i]];
      cnt2.erase(v2[i]);
    } else {
      lst2 = v2[i];
    }
  }
  vector<pair<pair<double, double>, int>> ok;
  for (pair<pair<double, double>, int> check : cnt2) {
    ok.push_back(check);
  }
  for (int i = 0; i < ok.size(); i++) {
    while (cnt2.size() &&
           abs(cnt2.begin()->first.first - ok[i].first.first) <= 1e-9) {
      cnt2.erase(cnt2.begin());
    }
    pair<pair<double, double>, int> &check = ok[i];
    long long add = (long long)(cnt2.size() + hori.size() + vert.size());
    res += add;
  }
  printf("%lld\n", res);
}
