#include <bits/stdc++.h>
using namespace std;
void __print(long long x) { cout << x; }
void __print(long x) { cout << x; }
void __print(unsigned x) { cout << x; }
void __print(unsigned long x) { cout << x; }
void __print(unsigned long long x) { cout << x; }
void __print(float x) { cout << x; }
void __print(double x) { cout << x; }
void __print(long double x) { cout << x; }
void __print(char x) { cout << '\'' << x << '\''; }
void __print(const char *x) { cout << '\"' << x << '\"'; }
void __print(const string &x) { cout << '\"' << x << '\"'; }
void __print(bool x) { cout << (x ? "true" : "false"); }
template <typename T, typename V>
void __print(const pair<T, V> &x) {
  cout << '{';
  __print(x.first);
  cout << ',';
  __print(x.second);
  cout << '}';
}
template <typename T>
void __print(const T &x) {
  long long f = 0;
  cout << '{';
  for (auto &i : x) cout << (f++ ? "," : ""), __print(i);
  cout << "}";
}
void _print() { cout << "]\n"; }
template <typename T, typename... V>
void _print(T t, V... v) {
  __print(t);
  if (sizeof...(v)) cout << ", ";
  _print(v...);
}
long long __pow(long long x, long long y) {
  long long res = 1;
  while (y > 0) {
    if (y & 1) res *= x;
    y >>= 1;
    x *= x;
  }
  return res;
}
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
const long long N = 1e3 + 2;
long long t, n, m;
void solve() {
  cin >> n;
  vector<pair<long long, long long>> a(n);
  for (long long i = 0; i < n; i++) {
    long long x, y;
    cin >> x >> y;
    a[i].first = x;
    a[i].second = y;
  }
  set<pair<pair<long long, long long>, pair<long long, long long>>> ss;
  for (long long i = 0; i < n - 1; i++) {
    for (long long j = i + 1; j < n; j++) {
      pair<long long, long long> slope = {a[j].second - a[i].second,
                                          a[j].first - a[i].first};
      if (a[j].first == a[i].first)
        ss.insert({{1e9, 1e9}, {a[i].first, 0}});
      else if (a[j].second == a[i].second)
        ss.insert({{0, 0}, {0, a[i].second}});
      else {
        long long GCD = gcd(slope.first, slope.second);
        slope = {slope.first / GCD, slope.second / GCD};
        long long y = a[i].second * slope.second - a[i].first * slope.first;
        ss.insert({slope, {0, y}});
      }
    }
  }
  long long sz = ss.size();
  map<pair<long long, long long>, long long> cnt;
  for (auto x : ss) cnt[x.first]++;
  long long ans = (sz * (sz - 1)) / 2;
  for (auto [x, y] : cnt) ans -= (y * (y - 1)) / 2;
  cout << ans << endl;
}
int32_t main() {
  t = 1;
  for (long long i = 1; i <= t; i++) {
    solve();
  }
}
