#include <iostream>
#include <string>
#include <map>
#include <math.h>
#include <vector>
#include <algorithm>
#include <cstdio>
#include <set>
#include <queue>
#include <sstream>
#include <deque>
#include <memory.h>
#include <cassert>
#include <ctime>
#include <cstring>
#include <cstdlib>
 
using namespace std; 
 
#define ll long long
#pragma comment(linker, "/STACK:64000000")
 
const int maxn = 111111;
const int inf = 1000000007;
const int mod = 1000000007;
const int dx[4] = {1, -1, 0, 0};
const int dy[4] = {0, 0, 1, -1};
 
struct pt {
	int x, y;
	
	pt() {}
	pt(int x, int y) : x(x), y(y) {}

	void read() {
		cin >> x >> y;
	}

	pt operator+ (const pt &p) {
		return pt(x + p.x, y + p.y);
	}

	pt operator- (const pt &p) {
		return pt(x - p.x, y - p.y);
	}

	ll operator^ (const pt &p) {
		return 1LL * x * p.y - 1LL * p.x * y;
	}

	bool up() {
		return y > 0 || y == 0 && x > 0;
	}

	bool operator< (const pt &p2) const {
		// up() == p.up()
		pt p1 = *this;
		return (p1 ^ p2) > 0;
	}

	bool operator== (const pt &p2) const {
		pt p1 = *this;
		return !(p1 < p2) && !(p2 < p1);
	}
};

int n;
pt a[maxn];

int main() {
    freopen("triangles.in", "r", stdin);
    freopen("triangles.out", "w", stdout);
    ios_base::sync_with_stdio(0);
     
    while (cin >> n) {
		vector<pt> v1, v2;
		for (int i = 0; i <= n; i++) {
			a[i].read();
			if (i) {
				a[i] = a[i] - a[0];
				if (a[i].up()) {
					v1.push_back(a[i]);
				} else {
					v2.push_back(a[i]);
				}
			}
		}
		sort(v1.begin(), v1.end());
		v1.resize(unique(v1.begin(), v1.end()) - v1.begin());
		sort(v2.begin(), v2.end());
		v2.resize(unique(v2.begin(), v2.end()) - v2.begin());

		vector<int> cnt1(v1.size()), cnt2(v2.size());
		for (int i = 1; i <= n; i++) {
			if (a[i].up()) {
				cnt1[lower_bound(v1.begin(), v1.end(), a[i]) - v1.begin()]++;
			} else {
				cnt2[lower_bound(v2.begin(), v2.end(), a[i]) - v2.begin()]++;
			}
		}

		ll ans = 1LL * n * (n - 1) * (n - 2) / 6;

		int j = 0, k = 0;
		int L = 0, R = 0;
		for (int i = 0; i < (int)v1.size(); i++) L += cnt1[i];
		for (int i = 0; i < (int)v2.size(); i++) R += cnt2[i];

		while (j < (int)v1.size() || k < (int)v2.size()) {
			int U = 0, D = 0;
			if (j < (int)v1.size() && k < (int)v2.size() && (v1[j] ^ v2[k]) == 0) {
				U = cnt1[j++];
				D = cnt2[k++];
			} else if (k == (int)v2.size() || j != (int)v1.size() && (v2[k] ^ v1[j]) > 0) {
				U = cnt1[j++];
			} else if (j == (int)v1.size() || k != (int)v2.size() && (v1[j] ^ v2[k]) > 0) {
				D = cnt2[k++];
			} else assert(0);

			L -= U;
			R -= D;

			ans -= 1LL * (U + D) * (U + D - 1) * (U + D - 2) / 6;
			ans -= 1LL * U * L * (U + L - 2) / 2;
			ans -= 1LL * D * R * (D + R - 2) / 2;
			ans -= 1LL * U * D * (L + R);

			R += U;
			L += D;
		}
		cout << ans << endl;
	}

    return 0;
}