#include <bits/stdc++.h>
using namespace std;
struct InputReader {
  char buf[1000001];
  int p;
  inline InputReader() { p = 1000001; }
  inline void Flush() {
    p = 0;
    fread(buf, 1, 1000001, stdin);
  }
  inline char C() {
    if (p >= 1000001) Flush();
    return buf[p++];
  }
  inline char Readnum() {
    char ch = C();
    while (!isdigit(ch) && ch != '-') ch = C();
    return ch;
  }
  inline void Readalpha(char &c) {
    c = C();
    while (!isalpha(c)) c = C();
  }
  int operator()() {
    int ans = 0, fu = 1;
    char ch = Readnum();
    if (ch == '-') fu = -1, ch = C();
    while (ch >= '0' && ch <= '9') {
      ans = ans * 10 + ch - '0';
      ch = C();
    }
    return ans * fu;
  }
  long long Readll() {
    long long ans = 0LL, fu = 1LL;
    char ch = Readnum();
    if (ch == '-') fu = -1LL, ch = C();
    while (ch >= '0' && ch <= '9') {
      ans = ans * 10LL + ch - '0';
      ch = C();
    }
    return ans * fu;
  }
  inline void Readstring(string &x) {
    x.clear();
    char ch = C();
    while (!isdigit(ch) && !isalpha(ch) && ch != '#' && ch != '.') ch = C();
    while (isdigit(ch) || isalpha(ch) || ch == '#' || ch == '.') {
      x += ch;
      ch = C();
    }
  }
  inline void Readchstring(char s[]) {
    int len = 0;
    char ch = C();
    while (!isdigit(ch) && !isalpha(ch)) ch = C();
    while (isdigit(ch) || isalpha(ch)) {
      s[len++] = ch;
      ch = C();
    }
    s[len] = '\0';
  }
  inline void Specialread(char &c) {
    c = C();
    while (!isdigit(c) && !isalpha(c) && c != '#' && c != '.' && c != '=' &&
           c != 'B')
      c = C();
  }
} In;
inline void Read(int &x) { x = In(); }
inline void Read(int &x, int &y) {
  x = In();
  y = In();
}
inline void Read(int &x1, int &x2, int &x3) {
  x1 = In();
  x2 = In();
  x3 = In();
}
inline void Read(int &x1, int &x2, int &x3, int &x4) {
  x1 = In();
  x2 = In();
  x3 = In();
  x4 = In();
}
inline void Read(long long &x) { x = In.Readll(); }
inline void Read(long long &x, long long &y) {
  x = In.Readll();
  y = In.Readll();
}
inline void Read(long long &x1, long long &x2, long long &x3) {
  x1 = In.Readll();
  x2 = In.Readll();
  x3 = In.Readll();
}
inline void Read(long long &x1, long long &x2, long long &x3, long long &x4) {
  x1 = In.Readll();
  x2 = In.Readll();
  x3 = In.Readll();
  x4 = In.Readll();
}
template <typename T>
void Read(T a[], int st, int ed) {
  for (int(i) = (st); (i) <= (ed); ++(i)) Read(a[i]);
}
inline void FILEIO() {}
inline void FILEIO(string pname) {
  freopen((pname + ".in").c_str(), "r", stdin);
  freopen((pname + ".out").c_str(), "w", stdout);
}
inline void FILEIO_OICONTEST(string pname) {
  freopen((pname + ".in").c_str(), "r", stdin);
  freopen((pname + ".out").c_str(), "w", stdout);
}
void Printtime() {}
void END() {
  Printtime();
  exit(0);
}
template <typename T>
void END(T mes) {
  cout << mes << endl;
  END();
}
template <typename T>
void Print(T a[], int s, int t, char sp = ' ', char ed = '\n') {
  if (s > t) return;
  for (int i = s; i < t; i++) cout << a[i] << sp;
  cout << a[t] << ed;
  cout.flush();
}
template <typename T>
void Print(T a, int s = 0, int t = -1, char sp = ' ', char ed = '\n') {
  if (t == -1) t = a.size() - 1;
  for (int i = s; i <= t; i++) cout << a[i] << sp;
  cout << ed;
  cout.flush();
}
long long Gcd(long long a, long long b) { return b ? Gcd(b, a % b) : a; }
struct F {
  long long a, b;
  F() {}
  F(long long ai, long long bi) {
    long long g = Gcd(abs(ai), abs(bi));
    a = ai / g;
    b = bi / g;
    if (a <= 0 and b < 0) {
      a = -a;
      b = -b;
    } else if (a > 0 and b < 0) {
      a = -a;
      b = -b;
    }
  }
};
inline bool operator==(F x, F y) { return x.a == y.a and x.b == y.b; }
inline bool operator!=(F x, F y) { return x.a != y.a or x.b != y.b; }
inline bool operator<(F x, F y) { return x.a * y.b < y.a * x.b; }
struct Line {
  F k, b;
  bool spe;
  long long spex;
  Line() {}
  Line(long long x1, long long y1, long long x2, long long y2) {
    if (x1 != x2) {
      k = F(y1 - y2, x1 - x2);
      b = F(y1 * (x1 - x2) - x1 * (y1 - y2), x1 - x2);
      assert(b == F(y2 * (x1 - x2) - x2 * (y1 - y2), x1 - x2));
      spe = 0;
      spex = 0;
    } else {
      k = F(20031111, 1);
      b = F(20031208, 1);
      spe = 1;
      spex = x1;
    }
  }
};
inline bool operator==(Line x, Line y) {
  return x.spe == y.spe and x.spex == y.spex and x.k == y.k and x.b == y.b;
}
inline bool operator<(Line x, Line y) {
  if (x.spe != y.spe) return x.spe < y.spe;
  if (x.spex != y.spex) return x.spex < y.spex;
  if (x.k != y.k) return x.k < y.k;
  return x.b < y.b;
}
int n;
int x[2048], y[2048];
set<Line> segs;
multiset<F> ks;
multiset<long long> spexs;
int main() {
  FILEIO();
  Read(n);
  for (int(i) = 1; (i) <= (n); ++(i)) Read(x[i], y[i]);
  long long ans = 0;
  for (int(i) = 1; (i) <= (n); ++(i))
    for (int(j) = (i + 1); (j) <= (n); ++(j)) {
      Line l = Line(x[i], y[i], x[j], y[j]);
      segs.insert(l);
    }
  long long spexcnt = 0, segcnt = 0;
  for (auto [k, b, spe, spex] : segs) {
    if (!spe)
      ks.insert(k);
    else
      ++spexcnt;
    ++segcnt;
  }
  for (auto l : segs) {
    if (l.spe) {
      ans += segcnt - spexcnt;
    } else {
      ans += segcnt - ks.count(l.k);
    }
  }
  assert(ans % 2 == 0);
  cout << ans / 2LL << endl;
  END();
}
