#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <map>
#include <math.h>
#include <string>
#include <ctime> 
#include <cstdlib>
#include <set>
#include <sstream>
#include <queue>
#include <functional>
#include <memory>
#include <assert.h>

#define sqr(x) ((x)*(x))
#define ll long long

using namespace std;

#pragma comment(linker,"/STACK:256000000")

struct point {
    int x,y;
    bool operator<(const point &p) {
        return (ll)x*p.y-(ll)y*p.x>0;
    }
};

const int maxn=100100;

int n;
ll ans;
point a[maxn],p;


bool check(point a, point b, point c) {
    return a<b && b<c && c<a || b<a && c<b && a<c;
}

int main() {
    freopen("triangles.in", "r", stdin);
    freopen("triangles.out", "w", stdout);
    cin >> n;
    cin >> p.x >> p.y;
    for (int i=0; i<n; i++) {
        cin >> a[i].x >> a[i].y;
        a[i].x-=p.x;
        a[i].y-=p.y;
    }

    for (int i=0; i<n-2; i++)
        for (int j=i+1; j<n-1; j++)
            for (int k=j+1; k<n; k++) 
                ans+=check(a[i],a[j],a[k]);

    cout << ans;
    return 0;
}