#include <bits/stdc++.h>
using namespace std;
const int N = 1e3 + 6, inf = 1e9;
int n, X[N], Y[N], tp, tt;
map<pair<int, int>, int> p, m;
set<int> s[N * N];
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
inline pair<int, int> work(int a, int b, int c, int d) {
  if (a == c) {
    if (!p[make_pair(inf, 0)]) p[make_pair(inf, 0)] = ++tp;
    if (!m[make_pair(a, c)]) m[make_pair(a, c)] = ++tt;
    return make_pair(p[make_pair(inf, 0)], m[make_pair(a, c)]);
  } else if (b == d) {
    if (!p[make_pair(0, inf)]) p[make_pair(0, inf)] = ++tp;
    if (!m[make_pair(b, d)]) m[make_pair(b, d)] = ++tt;
    return make_pair(p[make_pair(0, inf)], m[make_pair(b, d)]);
  } else {
    if (a > c) swap(a, c), swap(b, d);
    int dd = gcd(abs(d - b), c - a);
    int x = b * c - a * d, y = c - a, g = gcd(abs(x), y);
    if (!p[make_pair((d - b) / dd, (c - a) / dd)])
      p[make_pair((d - b) / dd, (c - a) / dd)] = ++tp;
    if (!m[make_pair(x / g, y / g)]) m[make_pair(x / g, y / g)] = ++tt;
    return make_pair(p[make_pair((d - b) / dd, (c - a) / dd)],
                     m[make_pair(x / g, y / g)]);
  }
}
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) scanf("%d %d", &X[i], &Y[i]);
  for (int i = 1; i <= n; i++)
    for (int j = i + 1; j <= n; j++) {
      pair<int, int> o = work(X[i], Y[i], X[j], Y[j]);
      s[o.first].insert(o.second);
    }
  long long sum = 0, now = 0;
  for (int i = 1; i <= tp; i++) {
    long long sz = s[i].size();
    sum += sz;
    now += sz * (sz - 1) / 2;
  }
  cout << sum * (sum - 1) / 2 - now << endl;
  return 0;
}
