#include <bits/stdc++.h>
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize("unroll-loops")
using namespace std;
const double pi =
    3.141592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342;
const int MR = 1010;
pair<int, int> p[MR];
long long nwd(long long a, long long b) { return b ? nwd(b, a % b) : a; }
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < (n); ++i) scanf("%d%d", &p[i].first, &p[i].second);
  long long res = 0;
  map<pair<long long, long long>, set<pair<long long, long long>>> M;
  set<int> degen;
  for (int i = 0; i < (n); ++i)
    for (int j = (i + 1); j < (n); ++j) {
      if (p[i].first == p[j].first) {
        degen.insert(p[i].first);
        continue;
      }
      pair<long long, long long> a =
          make_pair(p[j].second - p[i].second, p[j].first - p[i].first);
      long long da = nwd(a.first, a.second);
      a.first /= da;
      a.second /= da;
      auto tmp = make_pair(a.first * p[i].first, a.second);
      auto b = make_pair(p[i].second * tmp.second - tmp.first, tmp.second);
      long long db = nwd(b.first, b.second);
      b.first /= db;
      b.second /= db;
      M[a].insert(b);
    }
  int ilep = 0;
  for (const auto &pr : M) ilep += pr.second.size();
  res += ilep * (long long)degen.size();
  for (const auto &pr : M) {
    res += pr.second.size() * (long long)(ilep - pr.second.size());
    ilep -= pr.second.size();
  }
  printf("%lld\n", res);
  return 0;
}
