#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define clr(a,b) memset(a,b,sizeof(a))
#define all(v) ((v).begin()),((v).end())
#define read(v) freopen(v, "r", stdin)
#define write(v) freopen(v, "wt", stdout)
#define fastIO cout << fixed << setprecision(8), ios::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr)
double const EPS = 1e-9, PI = acos(-1);
const int N = 2e3 + 9, M = 2e3 + 9, OO = 1e9 + 7, MOD = 1e9 + 7;
const ll inf = 1e18;

map<pair<int, int>, int> slope;
map<int, int> Xs, Ys;
ll Comb[N][5];

void pascal(){
  for (int i = 0; i <= 2002; ++i) {
    int m = min(6, i);
    for (int j = 0; j <= m; ++j) {
      if(i == 0 || j == 0) {
        Comb[i][j] = 1;
        continue;
      }
      Comb[i][j] = Comb[i-1][j] + Comb[i-1][j-1];
    }
  }
}


int main() {
  fastIO;
//  read("input.in");
//  write("input.in");
  int n, a, b, gg;
  cin >> n;
  pascal();
  for (int i = 0; i < n; ++i) {
    cin >> a >> b;
    a += 200, b += 200; // fixing zero in GCD
    Xs[a]++;
    Ys[b]++;
    gg = __gcd(a, b);
    a /= gg, b /= gg;
    slope[{a, b}]++;
  }
  ll ans = Comb[n][3];
  for(auto it: slope) {
    if(it.second >= 3) {
      ans -= Comb[it.second][3];
    }
  }
  for(auto it: Xs) {
    if(it.second >= 3) {
      ans -= Comb[it.second][3];
    }
  }
  for(auto it: Ys) {
    if(it.second >= 3) {
      ans -= Comb[it.second][3];
    }
  }
  cout << ans;
  return 0;
}
