#include <bits/stdc++.h>
using namespace std;
const int N = 1010;
map<pair<int, int>, set<long long>> slope_map;
int x[N], y[N];
int gcd(int a, int b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
int main() {
  int n, total = 0;
  long long res = 0;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d%d", &x[i], &y[i]);
  for (int i = 1; i < n; i++)
    for (int j = i + 1; j <= n; j++) {
      int x1 = x[i], x2 = x[j], y1 = y[i], y2 = y[j];
      int a = y1 - y2, b = x1 - x2;
      int d = gcd(a, b);
      a /= d, b /= d;
      if (a < 0 || (a == 0 && b < 0)) {
        a = -a;
        b = -b;
      }
      long long c = 1ll * a * x1 - 1ll * b * y1;
      pair<int, int> slope(a, b);
      if (!slope_map[slope].count(c)) {
        total++;
        slope_map[slope].insert(c);
        res += total - slope_map[slope].size();
      }
    }
  cout << res << endl;
  return 0;
}
