#include <bits/stdc++.h>
using namespace std;
struct point {
  int x, y;
  point(int a = 0, int b = 0) {
    x = a;
    y = b;
  }
};
istream& operator>>(istream& in, point& a) {
  in >> a.x >> a.y;
  return in;
}
ostream& operator<<(ostream& out, point& a) {
  out << a.x << " " << a.y;
  return out;
}
struct line {
  int a, b, c;
  line(point p, point q) {
    a = p.y - q.y;
    b = q.x - p.x;
    c = -(p.x * a + p.y * b);
  }
  line() { a = b = c = 0; }
};
inline int gcd(int a, int b) {
  while (b) {
    swap(a, b);
    b %= a;
  }
  return a;
}
pair<int, int> get_pair(int a, int b) {
  int g = gcd(abs(a), abs(b));
  if (a == 0) {
    return {0, 1};
  }
  if (b == 0) {
    return {1, 0};
  }
  a /= g;
  b /= g;
  if (a < 0 == b < 0) {
    a = abs(a);
    b = abs(b);
  } else {
    a = -abs(a);
    b = abs(b);
  }
  return {a, b};
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int _ = 1;
  while (_--) {
    int n;
    cin >> n;
    map<pair<int, int>, set<int>> m;
    vector<point> a(n);
    for (int i = 0; i < n; i++) {
      cin >> a[i];
    }
    for (int i = 0; i < n; i++) {
      for (int j = i + 1; j < n; j++) {
        line l(a[i], a[j]);
        auto cur = get_pair(l.b, l.a);
        l.c /= gcd(abs(l.a), abs(l.b));
        if (l.a == 0) {
          m[cur].insert(a[i].y);
        } else if (l.b == 0) {
          m[cur].insert(a[i].x);
        } else {
          m[cur].insert(l.c * (l.b > 0 ? -1 : 1));
        }
      }
    }
    long long sum = 0;
    for (auto& p : m) {
      sum += p.second.size();
    }
    long long ans = 0;
    for (auto& p : m) {
      ans += p.second.size() * (sum - p.second.size());
    }
    cout << ans / 2 << endl;
  }
}
