#include <bits/stdc++.h>
using namespace std;
struct point {
  long long x, y;
  void input() {
    long long _x, _y;
    scanf("%I64d%I64d", &_x, &_y);
    x = _x;
    y = _y;
  }
  bool operator==(const point &p) const { return x == p.x && y == p.y; }
  bool operator<(const point &p) const { return x == p.x ? y < p.y : x < p.x; }
} p[2005];
struct line {
  long long a, b, c;
  bool operator<(const line &l) const {
    if (a == l.a) {
      if (b == l.b)
        return c < l.c;
      else
        return b < l.b;
    } else
      return a < l.a;
  }
};
long long gcd(long long x, long long y) { return y == 0 ? x : gcd(y, x % y); }
bool online(point p, line l) { return l.a * p.x + l.b * p.y + l.c == 0; }
line make_line(point p, point q) {
  line t;
  t.a = p.y - q.y;
  t.b = q.x - p.x;
  t.c = -t.a * p.x - t.b * p.y;
  if (t.a == 0) {
    if (t.c == 0)
      t.b = 1;
    else {
      long long g = gcd(t.b, t.c);
      t.b /= g;
      t.c /= g;
      if (t.b < 0) {
        t.b = -t.b;
        t.c = -t.c;
      }
    }
  } else if (t.b == 0) {
    if (t.c == 0)
      t.a = 1;
    else {
      long long g = gcd(t.a, t.c);
      t.a /= g;
      t.c /= g;
      if (t.a < 0) {
        t.a = -t.a;
        t.c = -t.c;
      }
    }
  } else if (t.c == 0) {
    long long g = gcd(t.a, t.b);
    t.a /= g;
    t.b /= g;
    if (t.a < 0) {
      t.a = -t.a;
      t.b = -t.b;
    }
  } else {
    long long g = gcd(gcd(t.a, t.b), t.c);
    t.a /= g;
    t.b /= g;
    t.c /= g;
    if (t.a < 0) {
      t.a = -t.a;
      t.b = -t.b;
      t.c = -t.c;
    }
  }
  return t;
}
long long C[2005];
void build() {
  for (int i = 1; i <= 2000; i++) {
    C[i] = i * (i - 1) / 2;
  }
}
map<line, long long> cnt;
int main() {
  build();
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    p[i].input();
  }
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j < n; j++) {
      cnt[make_line(p[i], p[j])]++;
    }
  }
  map<line, long long>::iterator itr;
  long long ans = 0;
  for (itr = cnt.begin(); itr != cnt.end(); itr++) {
    int loc = lower_bound(C, C + 2001, (*itr).second) - C;
    ans += (n - loc) * (*itr).second;
  }
  printf("%I64d\n", ans / 3);
  return 0;
}

### Prompt

Generate a CPP solution to 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>
using namespace std;
struct point {
  long long x, y;
  void input() {
    long long _x, _y;
    scanf("%I64d%I64d", &_x, &_y);
    x = _x;
    y = _y;
  }
  bool operator==(const point &p) const { return x == p.x && y == p.y; }
  bool operator<(const point &p) const { return x == p.x ? y < p.y : x < p.x; }
} p[2005];
struct line {
  long long a, b, c;
  bool operator<(const line &l) const {
    if (a == l.a) {
      if (b == l.b)
        return c < l.c;
      else
        return b < l.b;
    } else
      return a < l.a;
  }
};
long long gcd(long long x, long long y) { return y == 0 ? x : gcd(y, x % y); }
bool online(point p, line l) { return l.a * p.x + l.b * p.y + l.c == 0; }
line make_line(point p, point q) {
  line t;
  t.a = p.y - q.y;
  t.b = q.x - p.x;
  t.c = -t.a * p.x - t.b * p.y;
  if (t.a == 0) {
    if (t.c == 0)
      t.b = 1;
    else {
      long long g = gcd(t.b, t.c);
      t.b /= g;
      t.c /= g;
      if (t.b < 0) {
        t.b = -t.b;
        t.c = -t.c;
      }
    }
  } else if (t.b == 0) {
    if (t.c == 0)
      t.a = 1;
    else {
      long long g = gcd(t.a, t.c);
      t.a /= g;
      t.c /= g;
      if (t.a < 0) {
        t.a = -t.a;
        t.c = -t.c;
      }
    }
  } else if (t.c == 0) {
    long long g = gcd(t.a, t.b);
    t.a /= g;
    t.b /= g;
    if (t.a < 0) {
      t.a = -t.a;
      t.b = -t.b;
    }
  } else {
    long long g = gcd(gcd(t.a, t.b), t.c);
    t.a /= g;
    t.b /= g;
    t.c /= g;
    if (t.a < 0) {
      t.a = -t.a;
      t.b = -t.b;
      t.c = -t.c;
    }
  }
  return t;
}
long long C[2005];
void build() {
  for (int i = 1; i <= 2000; i++) {
    C[i] = i * (i - 1) / 2;
  }
}
map<line, long long> cnt;
int main() {
  build();
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    p[i].input();
  }
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j < n; j++) {
      cnt[make_line(p[i], p[j])]++;
    }
  }
  map<line, long long>::iterator itr;
  long long ans = 0;
  for (itr = cnt.begin(); itr != cnt.end(); itr++) {
    int loc = lower_bound(C, C + 2001, (*itr).second) - C;
    ans += (n - loc) * (*itr).second;
  }
  printf("%I64d\n", ans / 3);
  return 0;
}

```