#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;
}
I2luY2x1ZGU8Yml0cy9zdGRjKysuaD4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKI2RlZmluZSBsbCBsb25nIGxvbmcKI2RlZmluZSBjbHIoYSxiKSBtZW1zZXQoYSxiLHNpemVvZihhKSkKI2RlZmluZSBhbGwodikgKCh2KS5iZWdpbigpKSwoKHYpLmVuZCgpKQojZGVmaW5lIHJlYWQodikgZnJlb3Blbih2LCAiciIsIHN0ZGluKQojZGVmaW5lIHdyaXRlKHYpIGZyZW9wZW4odiwgInd0Iiwgc3Rkb3V0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ywgYiAvPSBnZzsKICAgIHNsb3BlW3thLCBifV0rKzsKICB9CiAgbGwgYW5zID0gQ29tYltuXVszXTsKICBmb3IoYXV0byBpdDogc2xvcGUpIHsKICAgIGlmKGl0LnNlY29uZCA+PSAzKSB7CiAgICAgIGFucyAtPSBDb21iW2l0LnNlY29uZF1bM107CiAgICB9CiAgfQogIGZvcihhdXRvIGl0OiBYcykgewogICAgaWYoaXQuc2Vjb25kID49IDMpIHsKICAgICAgYW5zIC09IENvbWJbaXQuc2Vjb25kXVszXTsKICAgIH0KICB9CiAgZm9yKGF1dG8gaXQ6IFlzKSB7CiAgICBpZihpdC5zZWNvbmQgPj0gMykgewogICAgICBhbnMgLT0gQ29tYltpdC5zZWNvbmRdWzNdOwogICAgfQogIH0KICBjb3V0IDw8IGFuczsKICByZXR1cm4gMDsKfQo=