#include <bits/stdc++.h>
const int MAX_N = (int)1e5 + 123;
const double eps = 1e-6;
const int inf = (int)1e9 + 123;
using namespace std;
int n;
pair<int, int> a[MAX_N];
int gcd(int a, int b) {
  a = abs(a), b = abs(b);
  while (a) {
    swap(a, b);
    a %= b;
  }
  return b;
}
struct Line {
  int a, b, c;
  Line() {}
  Line(pair<int, int> l, pair<int, int> r) {
    a = l.second - r.second;
    b = r.first - l.first;
    c = (-1) * (a * l.first + b * l.second);
    assert(a * l.first + b * l.second + c == 0 &&
           a * r.first + b * r.second + c == 0);
    if (a < 0 || (a == 0 && b < 0) || (a == 0 && b == 0 && c < 0))
      a *= -1, b *= -1, c *= -1;
    int g = gcd(a, gcd(b, c));
    a /= g, b /= g, c /= g;
  }
} q;
map<pair<int, pair<int, int> >, int> ok;
int main() {
  long long ans = 0;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i].first >> a[i].second;
  for (int i = 1; i <= n; i++) {
    ok.clear();
    for (int j = 1; j <= n; j++) {
      if (j == i) continue;
      q = Line(a[i], a[j]);
      ok[make_pair(q.a, make_pair(q.b, q.c))]++;
    }
    for (int j = 1; j <= n; j++) {
      if (j == i) continue;
      q = Line(a[i], a[j]);
      ans += (n - 1 - ok[make_pair(q.a, make_pair(q.b, q.c))]);
    }
  }
  assert(ans % 6 == 0);
  cout << ans / 6;
  return 0;
}

### Prompt

Create a solution in CPP for 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 int MAX_N = (int)1e5 + 123;
const double eps = 1e-6;
const int inf = (int)1e9 + 123;
using namespace std;
int n;
pair<int, int> a[MAX_N];
int gcd(int a, int b) {
  a = abs(a), b = abs(b);
  while (a) {
    swap(a, b);
    a %= b;
  }
  return b;
}
struct Line {
  int a, b, c;
  Line() {}
  Line(pair<int, int> l, pair<int, int> r) {
    a = l.second - r.second;
    b = r.first - l.first;
    c = (-1) * (a * l.first + b * l.second);
    assert(a * l.first + b * l.second + c == 0 &&
           a * r.first + b * r.second + c == 0);
    if (a < 0 || (a == 0 && b < 0) || (a == 0 && b == 0 && c < 0))
      a *= -1, b *= -1, c *= -1;
    int g = gcd(a, gcd(b, c));
    a /= g, b /= g, c /= g;
  }
} q;
map<pair<int, pair<int, int> >, int> ok;
int main() {
  long long ans = 0;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i].first >> a[i].second;
  for (int i = 1; i <= n; i++) {
    ok.clear();
    for (int j = 1; j <= n; j++) {
      if (j == i) continue;
      q = Line(a[i], a[j]);
      ok[make_pair(q.a, make_pair(q.b, q.c))]++;
    }
    for (int j = 1; j <= n; j++) {
      if (j == i) continue;
      q = Line(a[i], a[j]);
      ans += (n - 1 - ok[make_pair(q.a, make_pair(q.b, q.c))]);
    }
  }
  assert(ans % 6 == 0);
  cout << ans / 6;
  return 0;
}

```