#include <bits/stdc++.h>
const int maxn = 1005;
inline long long gcd(long long a, long long b) {
  static long long tem;
  a = std::abs(a);
  b = std::abs(b);
  while (b) {
    tem = a;
    a = b;
    b = tem % b;
  }
  return a;
}
struct coor {
  long long x, y;
  coor(long long x_ = 0, long long y_ = 0) : x(x_), y(y_) {}
  coor operator+(const coor& rhs) const { return coor(x + rhs.x, y + rhs.y); }
  coor operator-(const coor& rhs) const { return coor(x - rhs.x, y - rhs.y); }
  bool operator<(const coor& rhs) const {
    if (x != rhs.x) {
      return x < rhs.x;
    }
    return y < rhs.y;
  }
  void normalize() {
    static long long d;
    if (x == 0 && y == 0) {
      return;
    }
    if (x < 0) {
      x = -x;
      y = -y;
    } else if (x == 0 && y < 0) {
      y = -y;
    }
    d = gcd(x, y);
    x /= d;
    y /= d;
  }
  long long to() const { return (x + 10000) * 30001LL + (y + 10000); }
} p[maxn];
int n;
std::map<long long, std::unordered_set<long long> > mp;
std::map<coor, std::unordered_set<long long> > pm;
inline bool bhy(const std::unordered_set<long long>& aa,
                const std::unordered_set<long long>& ss) {
  for (auto it = aa.begin(); it != aa.end(); ++it) {
    if (!ss.count(*it)) {
      return false;
    }
  }
  return true;
}
inline bool equ(const std::unordered_set<long long>& aa,
                const std::unordered_set<long long>& ss) {
  return bhy(aa, ss) && bhy(ss, aa);
}
int main() {
  scanf("%d", &n);
  long long cnt1 = 0, cnt2 = 0;
  for (int i = 1; i <= n; ++i) {
    scanf("%lld%lld", &p[i].x, &p[i].y);
    for (int j = 1; j < i; ++j) {
      coor tc = p[i] - p[j];
      coor td(tc.y, -tc.x);
      td.normalize();
      long long tem = td.x * p[i].x + td.y * p[i].y;
      int t1 = mp[td.to()].count(tem);
      int t2 = pm[td].count(tem);
      assert(t1 == t2);
      if (!mp[td.to()].count(tem)) {
        mp[td.to()].insert(tem);
        ++cnt1;
      }
      if (!pm[td].count(tem)) {
        pm[td].insert(tem);
        ++cnt2;
      }
    }
  }
  long long ans = cnt2 * (cnt2 - 1) / 2;
  for (auto it = pm.begin(); it != pm.end(); ++it) {
    long long siz = (it->second).size();
    ans -= (siz * (siz - 1) / 2);
  }
  assert(cnt1 == cnt2);
  printf("%lld\n", ans);
  return 0;
}
