#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
long long mabs(long long a) { return a < 0 ? -a : a; }
struct Fraction {
  long long numerator;
  long long denominator;
  Fraction() {}
  Fraction(long long numerator, long long denominator)
      : numerator(numerator), denominator(denominator) {}
  Fraction operator+(const Fraction &rhs) const {
    long long n = numerator * rhs.denominator + rhs.numerator * denominator;
    long long d = denominator * rhs.denominator;
    auto ele = Fraction(n, d);
    ele.reduce();
    return ele;
  }
  Fraction operator-(const Fraction &rhs) const {
    long long n = numerator * rhs.denominator - rhs.numerator * denominator;
    long long d = denominator * rhs.denominator;
    auto ele = Fraction(n, d);
    ele.reduce();
    return ele;
  }
  Fraction operator*(const Fraction &rhs) const {
    auto ele =
        Fraction(numerator * rhs.numerator, denominator * rhs.denominator);
    ele.reduce();
    return ele;
  }
  bool operator==(const Fraction &rhs) const {
    return denominator == rhs.denominator && numerator == rhs.numerator;
  }
  bool operator!=(const Fraction &rhs) const { return !(rhs == *this); }
  bool operator<(const Fraction &rhs) const {
    if (denominator != rhs.denominator) return denominator < rhs.denominator;
    return numerator < rhs.numerator;
  }
  bool operator>(const Fraction &rhs) const { return rhs < *this; }
  bool operator<=(const Fraction &rhs) const { return !(rhs < *this); }
  bool operator>=(const Fraction &rhs) const { return !(*this < rhs); }
  void reduce() {
    long long num = gcd(mabs(denominator), mabs(numerator));
    if (numerator <= 0 && denominator >= 0) {
      numerator *= -1;
      denominator *= -1;
    }
    if (numerator <= 0 && denominator <= 0) {
      numerator *= -1;
      denominator *= -1;
    }
    denominator /= num;
    numerator /= num;
  }
  friend std::ostream &operator<<(std::ostream &os, const Fraction &fraction) {
    os << "denominator: " << fraction.denominator
       << " numerator: " << fraction.numerator;
    return os;
  }
};
long long cn2(long long n) { return n * (n - 1) / 2; }
const int N = (int)1e3 + 50;
long long x[N];
long long y[N];
int main() {
  int n;
  while (~scanf("%d", &n)) {
    map<Fraction, int> mp;
    set<pair<Fraction, Fraction> > st;
    for (int i = 0; i < n; i++) {
      scanf("%lld%lld", &x[i], &y[i]);
    }
    for (int i = 0; i < n - 1; i++) {
      for (int j = i + 1; j < n; j++) {
        Fraction k(y[j] - y[i], x[j] - x[i]);
        Fraction b;
        if (k.denominator == 0) {
          k.numerator = 1;
          b = Fraction(x[i], 1);
        } else {
          b = Fraction(y[i], 1) - k * Fraction(x[i], 1);
        }
        k.reduce();
        b.reduce();
        st.insert(pair<Fraction, Fraction>(k, b));
      }
    }
    for (auto p : st) {
      mp[p.first]++;
    }
    long long res = cn2(st.size());
    for (auto &p : mp) {
      if (p.second >= 2) {
        res -= cn2(p.second);
      }
    }
    printf("%lld\n", res);
  }
  return 0;
}
