#include <bits/stdc++.h>
using namespace std;
class frac {
 public:
  long long num, dem;
  frac() {}
  frac(long long a, long long b) {
    if ((a < 0 && b < 0) || (b < 0)) {
      num = a * -1;
      dem = b * -1;
    } else {
      num = a;
      dem = b;
    }
  }
  bool operator<(const frac& b) const {
    if (num != b.num) return num < b.num;
    return dem < b.dem;
  }
};
set<pair<frac, frac> > S;
map<frac, set<frac> > M;
int x[1010], y[1010];
set<int> ver;
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
frac operator+(const frac& a, const frac& b) {
  frac r = frac(a.num * b.dem + a.dem * b.num, a.dem * b.dem);
  long long g = gcd(abs(r.num), abs(r.dem));
  r.num /= g;
  r.dem /= g;
  return r;
}
frac operator-(const frac& a, const frac& b) {
  frac r = frac(a.num * b.dem - a.dem * b.num, a.dem * b.dem);
  long long g = gcd(abs(r.num), abs(r.dem));
  r.num /= g;
  r.dem /= g;
  return r;
}
frac operator*(const frac& a, const frac& b) {
  frac r = frac(a.num * b.num, a.dem * b.dem);
  long long g = gcd(abs(r.num), abs(r.dem));
  r.num /= g;
  r.dem /= g;
  return r;
}
int main() {
  int n;
  scanf("%d", &n);
  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 dy = y[j] - y[i], dx = x[j] - x[i];
      if (dx == 0)
        ver.insert(x[i]);
      else {
        frac m(dy, dx);
        long long g = gcd(abs(dy), abs(dx));
        m.num /= g;
        m.dem /= g;
        frac b = frac(y[i], 1) - m * frac(x[i], 1);
        S.insert(make_pair(m, b));
        M[m].insert(b);
      }
    }
  }
  long long s = S.size() + ver.size();
  long long ans = s * (s - 1) / 2;
  long long v = ver.size();
  ans -= (v * (v - 1)) / 2;
  for (auto it = M.begin(); it != M.end(); ++it) {
    long long s1 = it->second.size();
    ans -= s1 * (s1 - 1) / 2;
  }
  printf("%lld\n", ans);
  return 0;
}
