#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
string to_string(string s) { return '"' + s + '"'; }
string to_string(char s) { return string(1, s); }
string to_string(const char *s) { return to_string((string)s); }
string to_string(bool b) { return (b ? "true" : "false"); }
template <typename A>
string to_string(A);
template <typename A, typename B>
string to_string(pair<A, B> p) {
  return "(" + to_string(p.first) + ", " + to_string(p.second) + ")";
}
template <typename A>
string to_string(A v) {
  bool f = 1;
  string r = "{";
  for (const auto &x : v) {
    if (!f) r += ", ";
    f = 0;
    r += to_string(x);
  }
  return r + "}";
}
void debug_out() { cout << endl; }
template <typename Head, typename... Tail>
void debug_out(Head H, Tail... T) {
  cout << " " << to_string(H);
  debug_out(T...);
}
inline int add(int a, int b) {
  a += b;
  if (a >= MOD) a -= MOD;
  return a;
}
inline int sub(int a, int b) {
  a -= b;
  if (a < 0) a += MOD;
  return a;
}
inline int mul(int a, int b) { return (int)((long long)a * b % MOD); }
inline int binpow(int a, int b) {
  int res = 1;
  while (b > 0) {
    if (b & 1) res = mul(res, a);
    a = mul(a, a);
    b /= 2;
  }
  return res;
}
inline int inv(int a) { return binpow(a, MOD - 2); }
int gcd(int a, int b, int &x, int &y) {
  if (a == 0) {
    x = 0, y = 1;
    return b;
  }
  int x1, y1;
  int d = gcd(b % a, a, x1, y1);
  x = y1 - (b / a) * x1;
  y = x1;
  return d;
}
struct Line {
  int m1, m2, c1, c2;
  bool operator<(const Line &b) const {
    if (m1 == b.m1 && m2 == b.m2 && c1 == b.c1) return c2 < b.c2;
    if (m1 == b.m1 && m2 == b.m2) return c1 < b.c1;
    if (m1 == b.m1) return m2 < b.m2;
    return m1 < b.m1;
  }
};
map<Line, int> mp;
const int N = 1e3 + 5, INF = 1e9;
int n, x[N], y[N];
int gcd(int x, int y) {
  if (y == 0) return x;
  return gcd(y, x % y);
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (int i = 0; i < n; ++i) cin >> x[i] >> y[i];
  for (int i = 0; i < n; ++i)
    for (int j = i + 1; j < n; ++j) {
      if (x[i] == x[j]) {
        Line l = {1, 0, x[i], 1};
        mp[l]++;
      } else {
        int d1 = gcd(abs(y[j] - y[i]), abs(x[j] - x[i]));
        if (x[j] - x[i] < 0) d1 *= -1;
        int m1, m2, c1, c2;
        m1 = (y[j] - y[i]) / d1;
        m2 = (x[j] - x[i]) / d1;
        int d2 = gcd(abs(y[i] * x[j] - y[j] * x[i]), abs(x[i] - x[j]));
        if (x[j] - x[i] < 0) d2 *= -1;
        c1 = (y[i] * x[j] - y[j] * x[i]) / d2;
        c2 = (x[j] - x[i]) / d2;
        Line l = {m1, m2, c1, c2};
        mp[l]++;
      }
    }
  map<pair<int, int>, int> mymap;
  for (auto p : mp) {
    Line l = p.first;
    mymap[{l.m1, l.m2}]++;
  }
  int sz = mp.size();
  long long ans = 1ll * sz * (sz - 1) / 2;
  for (auto p : mymap) {
    int cnt = p.second;
    ans -= 1ll * cnt * (cnt - 1) / 2;
  }
  cout << ans << "\n";
  return 0;
}
