#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("sse2")
using namespace std;
const long long hell = 1000000007;
long long power(long long a, long long b) {
  if (b == 0) return 1;
  if (b == 1) return a;
  long long t = power(a, b / 2);
  t %= hell;
  t *= t;
  t %= hell;
  if (b % 2)
    return (t * a) % hell;
  else
    return t;
}
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b - a % b, a % b);
}
long long digitsum(long long x) {
  while (x > 9) {
    long long ans = 0;
    while (x != 0) {
      ans += x % 10;
      x /= 10;
    }
    x = ans;
  }
  return x;
}
long long pw(long long a, long long b) {
  long long x = a;
  for (long long i = 1; i < b; i++) {
    a = a * x;
  }
  return a;
}
long long solve() {
  map<pair<pair<long long, long long>, long long>, long long> m, m1, m2;
  long long n;
  vector<pair<long long, long long> > a;
  cin >> n;
  for (long long i = 0; i < n; i++) {
    long long x, y;
    cin >> x >> y;
    a.push_back({x, y});
  }
  sort((a).begin(), (a).end());
  for (long long i = 0; i < n; i++) {
    for (long long j = i + 1; j < n; j++) {
      long long x = a[i].first - a[j].first;
      long long y = a[i].second - a[j].second;
      long long g = gcd(abs(x), abs(y));
      x /= g;
      y /= g;
      m[{{-1 * y, x}, y * a[i].first - x * a[i].second}] = i;
      m1[{{y, x}, -1 * (y * a[i].first) - x * a[i].second}] = i;
    }
  }
  long long ans = m.size();
  ans *= (ans - 1);
  ans /= 2;
  map<pair<long long, long long>, long long> m3;
  for (auto& x : m) {
    m3[{x.first.first.first, x.first.first.second}]++;
  }
  for (auto& x : m3) {
    ans = ans - ((x.second - 1) * x.second) / 2;
  }
  cout << ans;
  return 0;
}
signed main() {
  long long t = 1;
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin.exceptions(cin.failbit);
  clock_t time_req;
  time_req = clock();
  long long k = 1;
  while (t--) {
    solve();
  }
  time_req = clock() - time_req;
  return 0;
}
