#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const long long inf = 2147383647;
const double pi = 2 * acos(0.0);
const double eps = 1e-9;
mt19937 rng(std::chrono::duration_cast<std::chrono::nanoseconds>(
                chrono::high_resolution_clock::now().time_since_epoch())
                .count());
template <typename S, typename T>
void xmin(S &a, T const &b) {
  if (b < a) a = b;
}
template <typename S, typename T>
void xmax(S &a, T const &b) {
  if (b > a) a = b;
}
struct debugger {
  template <typename T>
  debugger &operator,(const T &v) {
    cerr << v << " ";
    return *this;
  }
} dbg;
inline long long gcd(long long a, long long b) {
  a = ((a) < 0 ? -(a) : (a));
  b = ((b) < 0 ? -(b) : (b));
  while (b) {
    a = a % b;
    swap(a, b);
  }
  return a;
}
long long ext_gcd(long long A, long long B, long long *X, long long *Y) {
  long long x2, y2, x1, y1, x, y, r2, r1, q, r;
  x2 = 1;
  y2 = 0;
  x1 = 0;
  y1 = 1;
  for (r2 = A, r1 = B; r1 != 0;
       r2 = r1, r1 = r, x2 = x1, y2 = y1, x1 = x, y1 = y) {
    q = r2 / r1;
    r = r2 % r1;
    x = x2 - (q * x1);
    y = y2 - (q * y1);
  }
  *X = x2;
  *Y = y2;
  return r2;
}
inline long long modInv(long long a, long long m) {
  long long x, y;
  ext_gcd(a, m, &x, &y);
  x %= m;
  if (x < 0) x += m;
  return x;
}
inline long long power(long long a, long long p) {
  long long res = 1, x = a;
  while (p) {
    if (p & 1) res = (res * x);
    x = (x * x);
    p >>= 1;
  }
  return res;
}
inline long long bigmod(long long a, long long p, long long m) {
  long long res = 1 % m, x = a % m;
  while (p) {
    if (p & 1) res = (res * x) % m;
    x = (x * x) % m;
    p >>= 1;
  }
  return res;
}
signed gen(int T) {
  ofstream o("gen.txt");
  o << T << "\n";
  for (int cas = 0; cas < T; ++cas) {
    o << "\n";
  }
  o << endl;
  o.close();
  return 0;
}
class Fraction {
  long long num, denom;
  void simplify() {
    long long g = gcd(num, denom);
    num /= g;
    denom /= g;
    if (denom < 0) {
      num *= -1;
      denom *= -1;
    }
  }

 public:
  Fraction() {
    num = 0;
    denom = 1;
  }
  Fraction(long long a, long long b) {
    if (b == 0) {
      num = 1;
      denom = 0;
    } else {
      num = a;
      denom = b;
      simplify();
    }
  }
  Fraction(long long x) {
    num = x;
    denom = 1;
  }
  Fraction(pair<long long, long long> x) {
    num = x.first;
    denom = x.second;
    simplify();
  }
  Fraction(const Fraction &b) {
    num = b.num;
    denom = b.denom;
  }
  void operator=(long long x) {
    num = x;
    denom = 1;
  }
  void operator=(pair<long long, long long> x) {
    num = x.first;
    denom = x.second;
    simplify();
  }
  void operator=(Fraction b) {
    num = b.num;
    denom = b.denom;
  }
  Fraction operator-() { return Fraction(-num, denom); }
  Fraction operator+(Fraction b) {
    Fraction res;
    res.denom = abs((((denom) / gcd((denom), (b.denom))) * (b.denom)));
    res.num = (res.denom / denom) * num + (res.denom / b.denom) * b.num;
    res.simplify();
    return res;
  }
  Fraction operator-(Fraction b) { return (*this) + (-b); }
  Fraction operator*(Fraction b) {
    Fraction res(b.num / gcd(b.num, denom), b.denom / gcd(b.denom, num));
    res.num *= num / gcd(num, b.denom);
    res.denom *= denom / gcd(denom, b.num);
    res.simplify();
    return res;
  }
  Fraction operator/(Fraction b) {
    Fraction rev(b.denom, b.num);
    if (rev.denom < 0) {
      rev.denom *= -1;
      rev.num *= -1;
    }
    return (*this) * rev;
  }
  void operator+=(Fraction b) { *this = *this + b; }
  void operator-=(Fraction b) { *this = *this - b; }
  void operator*=(Fraction b) { *this = *this * b; }
  void operator/=(Fraction b) { *this = *this / b; }
  bool operator==(Fraction b) {
    if (num == b.num && denom == b.denom)
      return true;
    else
      return false;
  }
  bool operator<(Fraction b) const {
    if (num * b.denom < b.num * denom)
      return true;
    else
      return false;
  }
  bool operator>(Fraction b) { return (b < *this); }
  bool operator<=(Fraction b) {
    if (*this == b || *this < b)
      return true;
    else
      return false;
  }
  bool operator>=(Fraction b) { return (b <= *this); }
  Fraction getAbs() { return Fraction(abs(num), denom); }
};
signed main() {
  cin.tie(0);
  cout.tie(0);
  ios_base::sync_with_stdio(false);
  int n;
  cin >> n;
  vector<int> X(n), Y(n);
  for (long long i = (0); i <= (n - 1); ++i) {
    cin >> X[i] >> Y[i];
  }
  map<Fraction, set<Fraction>> lines;
  for (long long i = (0); i <= (n - 1); ++i) {
    for (long long j = (i + 1); j <= (n - 1); ++j) {
      int x1 = X[i], y1 = Y[i], x2 = X[j], y2 = Y[j];
      int dx = x2 - x1, dy = y2 - y1;
      Fraction A(dy, dx), B;
      if (dx == 0) {
        B = x1;
      } else {
        B = A * (-x1) + y1;
      }
      lines[A].insert(B);
    }
  }
  int all = 0;
  for (auto &it : lines) {
    all += ((long long)(it.second).size());
  }
  long long res = 0;
  for (auto &it : lines) {
    int sz = ((long long)(it.second).size());
    res += sz * (all - sz);
  }
  res /= 2;
  cout << res << "\n";
  return 0;
}
