#include <bits/stdc++.h>
using namespace std;
const int INF = (int)2e9;
const long long INFL = (long long)9e18;
const int MAXINT = ((~0) ^ (1 << 31));
const long long MAXLL = ((~0) ^ ((long long)1 << 63));
template <class T>
inline T pow2(T a) {
  return a * a;
}
template <class T>
inline bool mineq(T& a, T b) {
  return (a > b) ? (a = b, true) : false;
}
template <class T>
inline bool maxeq(T& a, T b) {
  return (a < b) ? (a = b, true) : false;
}
const int maxn = 2e3;
long long n, x, y, t, ans0, ans1, sum, csum;
pair<long long, long long> p[maxn];
vector<pair<long long, long long> > ans;
set<pair<long long, long long> > st;
map<pair<pair<long long, long long>, long long>, long long> mp;
long long gcd(long long a, long long b) {
  a = max(a, -a);
  b = max(b, -b);
  if (a < b) swap(a, b);
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> x >> y;
    p[i] = {x, y};
  }
  sort(p, p + n);
  for (int i = 0; i < n; i++) {
    st.clear();
    for (int j = i + 1; j < n; j++) {
      x = p[j].first - p[i].first;
      y = p[j].second - p[i].second;
      long long x1 = x / gcd(x, y);
      long long y1 = y / gcd(x, y);
      x = x1;
      y = y1;
      if (!mp[{{x, y}, j}]) {
        mp[{{x, y}, i}] = 1;
        mp[{{x, y}, j}] = 1;
        if (st.find({x, y}) == st.end()) {
          st.insert({x, y});
          if (x == 0)
            ans0++;
          else if (y == 0)
            ans1++;
          else
            ans.push_back({x, y});
        }
      }
    }
  }
  sort(ans.begin(), ans.end());
  t = 1;
  for (int i = 1; i < ans.size(); i++) {
    if (ans[i] == ans[i - 1])
      t++;
    else {
      sum += t * (t - 1) / 2;
      t = 1;
    }
  }
  sum += t * (t - 1) / 2;
  sum += ans0 * (ans0 - 1) / 2;
  sum += ans1 * (ans1 - 1) / 2;
  csum = ans.size() + ans0 + ans1;
  cout << csum * (csum - 1) / 2 - sum;
}
