#include <bits/stdc++.h>
using namespace std;
const int N = 1004;
pair<int, int> p[N];
bool vis[N][N];
int n, m;
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
map<pair<int, int>, vector<int>> mp;
map<pair<int, int>, int> mq;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d %d", &p[i].first, &p[i].second);
  sort(p + 1, p + n + 1);
  for (int i = 1; i <= n; i++) {
    mp.clear();
    for (int j = i + 1; j <= n; j++) {
      if (vis[i][j]) continue;
      int dx = p[j].first - p[i].first, dy = p[j].second - p[i].second;
      int g = gcd(dx, abs(dy));
      dx /= g;
      dy /= g;
      mp[pair<int, int>(dx, dy)].push_back(j);
    }
    for (auto it = mp.begin(); it != mp.end(); it++) {
      ++mq[it->first];
      vector<int>& v = it->second;
      for (int i = 0; i < v.size(); i++)
        for (int j = i + 1; j < v.size(); j++) vis[v[i]][v[j]] = 1;
    }
  }
  long long s1 = 0, s2 = 0;
  for (auto it = mq.begin(); it != mq.end(); it++) {
    s1 += it->second;
    s2 += 1ll * it->second * it->second;
  }
  s1 = (s1 * s1 - s2) >> 1;
  printf("%lld\n", s1);
}
