#include <bits/stdc++.h>
using namespace std;
const int N = 1e3 + 10;
const long long mod = 1e9 + 7;
int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); }
map<pair<int, int>, set<int> > v;
struct point {
  int x, y;
} p[N];
int n;
long long num, ans;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d%d", &p[i].x, &p[i].y);
  for (int i = 1; i <= n; i++)
    for (int j = i + 1; j <= n; j++) {
      int a = p[i].x - p[j].x, b = p[i].y - p[j].y;
      int g = gcd(a, b);
      a /= g;
      b /= g;
      int c = b * p[i].x - a * p[i].y;
      pair<int, int> p = make_pair(a, b);
      v[p].insert(c);
    }
  for (auto it : v) {
    num += it.second.size();
  }
  for (auto it : v) {
    ans += (num - it.second.size()) * it.second.size();
  }
  printf("%lld\n", ans / 2);
}
