#include <bits/stdc++.h>
using namespace std;
long long read() {
  int f = 1;
  long long res = 0;
  char ch;
  do {
    ch = getchar();
    if (ch == '-') f = -f;
  } while (ch < '0' || ch > '9');
  do {
    res = res * 10 + ch - '0';
    ch = getchar();
  } while (ch >= '0' && ch <= '9');
  return f == 1 ? res : -res;
}
const int N = 100010;
const int INF = 1000000000;
int n, m, q, K;
int mod = 1000000007;
int head[N], to[N << 1], nxt[N << 1], color[N << 1], tot;
char str[N];
int A[N], B[N];
void addEdge(int u, int v) {
  tot++;
  nxt[tot] = head[u];
  to[tot] = v;
  head[u] = tot;
}
long long myPow(long long a, int b) {
  if (b == 0) return 1;
  long long ans = myPow(a, b / 2);
  ans *= ans;
  ans %= mod;
  if (b % 2 == 1) {
    ans *= a;
    ans %= mod;
  }
  return ans;
}
void addMod(int &a, long long b) { a = (a + b) % mod; }
int mulMod(int a, int b) { return 1LL * a * b % mod; }
long long mmin(long long a, long long b) { return a < b ? a : b; }
long long mmax(long long a, long long b) { return a > b ? a : b; }
bool contain(int set, int i) { return (set & (1 << i)) > 0; }
int countOne(int set) {
  int res = 0;
  while (set) {
    res++;
    set &= set - 1;
  }
  return res;
}
map<double, vector<pair<int, int>>> lineMap;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> A[i];
    cin >> B[i];
  }
  for (int i = 0; i < n; i++)
    for (int j = i + 1; j < n; j++) {
      int y = B[i] - B[j];
      int x = A[i] - A[j];
      bool ex = false;
      vector<pair<int, int>> &line =
          x == 0 ? lineMap[INF] : lineMap[1.0 * y / x];
      for (int k = 0; k < line.size(); k++) {
        int ni = line[k].first;
        int nj = line[k].second;
        int ny = B[ni] - B[nj];
        int nx = A[ni] - A[nj];
        if (ny * x == nx * y) {
          if (ni != i) {
            int my = B[ni] - B[i];
            int mx = A[ni] - A[i];
            if (my * x == mx * y) {
              ex = true;
              break;
            }
          } else if (ni != j) {
            int my = B[ni] - B[j];
            int mx = A[ni] - A[j];
            if (my * x == mx * y) {
              ex = true;
              break;
            }
          }
        }
      }
      if (!ex) {
        if (x == 0)
          lineMap[INF].push_back(make_pair(i, j));
        else
          lineMap[1.0 * y / x].push_back(make_pair(i, j));
      }
    }
  long long res = 0;
  long long sum = 0;
  for (auto it : lineMap) {
    sum += it.second.size();
  }
  for (auto it : lineMap) {
    int cnt = it.second.size();
    res += (sum - cnt) * cnt;
  }
  cout << res / 2 << endl;
  return 0;
}
