#include <bits/stdc++.h>
const int mod = 998244353;
const int N = 1e6 + 7;
using namespace std;
long long n, m, k, i, j, t, sig = 0, ans;
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
map<pair<int, int>, set<long long>> mp;
long long x[1005], y[1005];
struct node {
  int x, pos;
} p[500007];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  long long ans = 0, sum = 0;
  for (i = 1; i <= n; i++) cin >> x[i] >> y[i];
  for (i = 1; i <= n - 1; i++) {
    for (j = i + 1; j <= n; j++) {
      long long x1 = x[i], x2 = x[j], y1 = y[i], y2 = y[j];
      int b = x1 - x2, a = y1 - y2;
      long long d = gcd(a, b);
      a /= d, b /= d;
      if (a < 0 || (!a && b < 0)) {
        a = -a, b = -b;
      }
      pair<int, int> line(a, b);
      long long c = a * x1 - b * y1;
      if (!mp[line].count(c)) {
        sum++;
        mp[line].insert(c);
        ans += sum - mp[line].size();
      }
    }
  }
  cout << ans;
  return 0;
}
