#include <bits/stdc++.h>
const char* INPUTFILE = NULL;
const char* OUTPUTFILE = NULL;
const char* ERROR_LOG__FILE = NULL;
const FILE* INPUT = (INPUTFILE ? freopen(INPUTFILE, "r", stdin) : stdin);
const FILE* OUTPUT = (OUTPUTFILE ? freopen(OUTPUTFILE, "w", stdout) : stdout);
const FILE* ERROR_LOG =
    (ERROR_LOG__FILE ? freopen(ERROR_LOG__FILE, "w", stderr) : stderr);
inline double TIME() {
  return (static_cast<double>(clock())) / (static_cast<double>(CLOCKS_PER_SEC));
}
using namespace std;
long long gcd(long long a, long long b) { return (b ? gcd(b, a % b) : a); }
long long gcd(long long a, long long b, long long c) {
  return gcd(gcd(a, b), c);
}
class point {
 public:
  long long x, y;
  point(long long x = 0, long long y = 0) : x(x), y(y) {}
  double distance(point a) {
    return sqrt((x - a.x) * (x - a.x) + (y - a.y) * (y - a.y));
  }
  bool operator==(point a) const { return (x == a.x && y == a.y); }
  bool operator<(point a) const { return x < a.x || (x == a.x && y < a.y); }
};
class line {
 public:
  long long A, B, C;
  line() {}
  line(point a, point b) {
    A = a.y - b.y;
    B = b.x - a.x;
    C = -(A * a.x + B * a.y);
    if (A < 0) {
      A = -A;
      B = -B;
      C = -C;
    }
    if (A == 0 && B < 0) {
      B = -B;
      C = -C;
    }
    long long z = gcd(abs(A), abs(B), abs(C));
    A /= z;
    B /= z;
    C /= z;
    assert(A != 0 || B != 0);
  }
  bool operator==(line a) const { return (A == a.A && B == a.B && C == a.C); }
  bool operator<(line a) const {
    return (A < a.A || (A == a.A && B < a.B) ||
            (A == a.A && B == a.B && C < a.C));
  }
};
map<line, set<point> > cnt;
const int MAX_N = 2000;
int n;
int x[MAX_N], y[MAX_N];
long long ans;
inline void SolveOrDie() {
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) {
    scanf("%d%d", &x[i], &y[i]);
  }
  for (int i = 0; i < n; ++i) {
    for (int j = i + 1; j < n; ++j) {
      cnt[line(point(x[i], y[i]), point(x[j], y[j]))].insert(point(x[i], y[i]));
      cnt[line(point(x[i], y[i]), point(x[j], y[j]))].insert(point(x[j], y[j]));
    }
  }
  ans = n * 1ll * (n - 1) * (n - 2) / 6;
  for (const auto& i : cnt) {
    int qq = (int)i.second.size();
    ans -= qq * 1ll * (qq - 1) * (qq - 2) / 6;
  }
  cout << ans << endl;
}
int main(const int argc, const char** argv) {
  assert(INPUT);
  try {
    SolveOrDie();
  } catch (const std ::exception& e) {
    cerr << e.what() << std ::endl;
    exit(-1);
  } catch (...) {
    cerr << "Exception\n";
    exit(-1);
  }
  return 0;
}

### Prompt

In cpp, your task is to solve the following problem:

Vanya got bored and he painted n distinct points on the plane. After that he connected all the points pairwise and saw that as a result many triangles were formed with vertices in the painted points. He asks you to count the number of the formed triangles with the non-zero area.

Input

The first line contains integer n (1 ≤ n ≤ 2000) — the number of the points painted on the plane. 

Next n lines contain two integers each xi, yi ( - 100 ≤ xi, yi ≤ 100) — the coordinates of the i-th point. It is guaranteed that no two given points coincide.

Output

In the first line print an integer — the number of triangles with the non-zero area among the painted points.

Examples

Input

4
0 0
1 1
2 0
2 2


Output

3


Input

3
0 0
1 1
2 0


Output

1


Input

1
1 1


Output

0

Note

Note to the first sample test. There are 3 triangles formed: (0, 0) - (1, 1) - (2, 0); (0, 0) - (2, 2) - (2, 0); (1, 1) - (2, 2) - (2, 0).

Note to the second sample test. There is 1 triangle formed: (0, 0) - (1, 1) - (2, 0).

Note to the third sample test. A single point doesn't form a single triangle.

### Response

```cpp
#include <bits/stdc++.h>
const char* INPUTFILE = NULL;
const char* OUTPUTFILE = NULL;
const char* ERROR_LOG__FILE = NULL;
const FILE* INPUT = (INPUTFILE ? freopen(INPUTFILE, "r", stdin) : stdin);
const FILE* OUTPUT = (OUTPUTFILE ? freopen(OUTPUTFILE, "w", stdout) : stdout);
const FILE* ERROR_LOG =
    (ERROR_LOG__FILE ? freopen(ERROR_LOG__FILE, "w", stderr) : stderr);
inline double TIME() {
  return (static_cast<double>(clock())) / (static_cast<double>(CLOCKS_PER_SEC));
}
using namespace std;
long long gcd(long long a, long long b) { return (b ? gcd(b, a % b) : a); }
long long gcd(long long a, long long b, long long c) {
  return gcd(gcd(a, b), c);
}
class point {
 public:
  long long x, y;
  point(long long x = 0, long long y = 0) : x(x), y(y) {}
  double distance(point a) {
    return sqrt((x - a.x) * (x - a.x) + (y - a.y) * (y - a.y));
  }
  bool operator==(point a) const { return (x == a.x && y == a.y); }
  bool operator<(point a) const { return x < a.x || (x == a.x && y < a.y); }
};
class line {
 public:
  long long A, B, C;
  line() {}
  line(point a, point b) {
    A = a.y - b.y;
    B = b.x - a.x;
    C = -(A * a.x + B * a.y);
    if (A < 0) {
      A = -A;
      B = -B;
      C = -C;
    }
    if (A == 0 && B < 0) {
      B = -B;
      C = -C;
    }
    long long z = gcd(abs(A), abs(B), abs(C));
    A /= z;
    B /= z;
    C /= z;
    assert(A != 0 || B != 0);
  }
  bool operator==(line a) const { return (A == a.A && B == a.B && C == a.C); }
  bool operator<(line a) const {
    return (A < a.A || (A == a.A && B < a.B) ||
            (A == a.A && B == a.B && C < a.C));
  }
};
map<line, set<point> > cnt;
const int MAX_N = 2000;
int n;
int x[MAX_N], y[MAX_N];
long long ans;
inline void SolveOrDie() {
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) {
    scanf("%d%d", &x[i], &y[i]);
  }
  for (int i = 0; i < n; ++i) {
    for (int j = i + 1; j < n; ++j) {
      cnt[line(point(x[i], y[i]), point(x[j], y[j]))].insert(point(x[i], y[i]));
      cnt[line(point(x[i], y[i]), point(x[j], y[j]))].insert(point(x[j], y[j]));
    }
  }
  ans = n * 1ll * (n - 1) * (n - 2) / 6;
  for (const auto& i : cnt) {
    int qq = (int)i.second.size();
    ans -= qq * 1ll * (qq - 1) * (qq - 2) / 6;
  }
  cout << ans << endl;
}
int main(const int argc, const char** argv) {
  assert(INPUT);
  try {
    SolveOrDie();
  } catch (const std ::exception& e) {
    cerr << e.what() << std ::endl;
    exit(-1);
  } catch (...) {
    cerr << "Exception\n";
    exit(-1);
  }
  return 0;
}

```