#include <bits/stdc++.h>
using namespace std;
double EPS = 1e-9;
struct point {
  double x, y;
  point() { x = y = 0.0; }
  point(double _x, double _y) : x(_x), y(_y) {}
};
struct line {
  double a, b, c;
  bool operator==(line l2) const {
    return ((fabs(a - l2.a) < EPS) && (fabs(b - l2.b) < EPS)) &&
           (fabs(c - l2.c) < EPS);
  }
  bool operator<(line l2) const {
    if ((fabs(a - l2.a) < EPS) && (fabs(b - l2.b) < EPS)) {
      if (fabs(c - l2.c) < EPS) {
        return false;
      }
      if (a == 0) {
        return ((-1 * c) / b) < ((-1 * l2.c) / l2.b);
      }
      return ((-1 * c) / a) < ((-1 * l2.c) / l2.a);
    }
    if (b == 0.0) {
      return true;
    }
    if (l2.b == 0.0) {
      return false;
    }
    double slope1 = a * -1;
    double slope2 = l2.a * -1;
    return slope1 < slope2;
  }
};
void line_maker(point p1, point p2, line &l) {
  if (fabs(p1.x - p2.x) < EPS) {
    l.a = 1.0;
    l.b = 0.0;
    l.c = -p1.x;
  } else {
    l.a = -(double)(p1.y - p2.y) / (p1.x - p2.x);
    l.b = 1.0;
    l.c = -(double)(l.a * p1.x) - p1.y;
  }
}
bool areParallel(line l1, line l2) {
  return (fabs(l1.a - l2.a) < EPS) && (fabs(l1.b - l2.b) < EPS);
}
bool areIntersect(line l1, line l2) {
  if (areParallel(l1, l2)) {
    return false;
  }
  return true;
}
int main() {
  int N;
  cin >> N;
  vector<point> Points;
  set<line> Lines;
  for (int i = 0; i < N; i++) {
    double x, y;
    cin >> x >> y;
    Points.push_back(point(x, y));
  }
  for (int i = 0; i < N; i++) {
    for (int j = i + 1; j < N; j++) {
      line l;
      line_maker(Points[i], Points[j], l);
      Lines.insert(l);
    }
  }
  map<double, long long> SS;
  long long sz = Lines.size();
  long long cnt = (sz * (sz - 1)) / 2, v = 0;
  for (auto x : Lines) {
    if (x.b == 0.0) {
      v++;
    } else {
      SS[(x.a * -1)]++;
    }
  }
  for (auto y : SS) {
    if (y.second > 1) {
      cnt -= (y.second * (y.second - 1)) / 2;
    }
  }
  if (v > 0) {
    cnt -= (v * (v - 1)) / 2;
  }
  cout << cnt;
  return 0;
}
