#include<iostream>
//#include<cstdio>
#include<algorithm>
#include<vector>
using namespace std;

struct point{ int x; int y; };
struct points_pair{ point p1; point p2; };

struct resp_comp {
        resp_comp(points_pair resp) {
            this -> DX = resp.p2.y - resp.p1.y;
            this -> DY = - (resp.p2.x - resp.p1.x);
        }
        bool operator () (points_pair a, points_pair b){
            int dx = b.p2.x - a.p2.x;
            int dy = b.p2.y - a.p2.y;
            return dx * DX + dy * DY > 0;
        }
        int DX, DY;
    };

int dphi(points_pair a, points_pair b){
    return (a.p2.x - a.p1.x)*(b.p2.y - b.p1.y) - (a.p2.y - a.p1.y)*(b.p2.x - b.p1.x);
}

int dphi2(points_pair a, points_pair b){
    points_pair na, nb;
    na.p1 = a.p1; na.p2 = b.p2;
    nb.p1 = b.p1; nb.p2 = a.p2;
    return dphi(na, nb);
}

bool comp(points_pair a, points_pair b){
    if (dphi(a, b) > 0) return true;
    else return false;
};

int main(){
    unsigned long int n;
    vector<point> p;
    vector<points_pair> a;
    point t;
    points_pair t2;

//    freopen("in.txt", "r", stdin);
    cin >> n;
    unsigned long int tot = (n*(n - 1)*(n - 2))/6;

    for (int i = 0; i < n; i++){
        cin >> t.x >> t.y;
        p.push_back(t);
    }

    for (int i = 0; i < n; i++)
    for (int j = i + 1; j < n; j++){
        t2.p1 = p[i];
        t2.p2 = p[j];
        a.push_back(t2);
    }

    sort(a.begin(), a.end(), comp);

    vector<points_pair>::iterator a_it = a.begin();
    int i;
    unsigned long int cnt, dcnt;
    while (a_it < a.end()){
        points_pair tmp = *a_it;
        vector<points_pair> d;

        while ((a_it < a.end()) && (dphi(*a_it, tmp) == 0)) {
            d.push_back(*a_it); a_it++;
        };

        sort(d.begin(), d.end(), resp_comp(tmp));
        i = 1;
        while (i < d.size()){
            cnt = 1;
            while ((i < d.size()) && (dphi2(d[i], d[i-1]) == 0)) {i++; cnt++; }
            dcnt = ((sqrt(1+8*cnt)-3)*cnt)/6;
            tot -= dcnt;
            i++;
        }
    }

    cout << tot;
    return 0;
}


#include<iostream>
#include<algorithm>
#include<vector>
//#include<cstdio>

using namespace std;

struct point{
    long int x; long int y;
};

struct paired{
    point p1; point p2;
};

long int vprod(paired a, paired b){
    long int dxa = a.p2.x - a.p1.x;
    long int dyb = b.p2.y - b.p1.y;
    long int dya = a.p2.y - a.p1.y;
    long int dxb = b.p2.x - b.p1.x;
    return dxa*dyb - dya*dxb;
}

bool same(paired a, paired b){
    paired nb;
    nb.p1 = a.p1; nb.p2 = b.p1;
    return (vprod(a, b) == 0) && (vprod(a, nb) == 0);
}

paired ordered(paired a){
    point c;
    long int dx = a.p2.x - a.p1.x;
    long int dy = a.p2.y - a.p1.y;
    if ((dy < 0) || ((dy == 0) && (dx < 0))){
        c = a.p1; a.p1 = a.p2; a.p2 = c;
    }
    return a;
}

bool rotation_order (paired a, paired b){
    return vprod(ordered(a), ordered(b)) > 0;
}

struct shift_order {
       long int DX, DY;
        shift_order(paired resp) {
            this -> DX = resp.p2.y - resp.p1.y;
            this -> DY = - (resp.p2.x - resp.p1.x); };
        bool operator () (paired a, paired b){
            long int dx = b.p2.x - a.p2.x;
            long int dy = b.p2.y - a.p2.y;
            return dx * DX + dy * DY > 0;
        }
};

int main(){

//    freopen("in.txt", "r", stdin);
    unsigned long int n;
    cin >> n;
    unsigned long int tot = (n*(n - 1)*(n - 2))/6;

    vector<point> p;
    point t;
    for (long int i = 0; i < n; i++){
        cin >> t.x >> t.y;
        p.push_back(t);
    }

    vector<paired> a;
    paired t2;
    for (long int i = 0; i < n; i++)
    for (long int j = i + 1; j < n; j++){
        t2.p1 = p[i];
        t2.p2 = p[j];
        a.push_back(t2);
    }
    sort(a.begin(), a.end(), rotation_order);

    vector<paired>::iterator a_it = a.begin();
    long int i;
    unsigned long int cnt, dcnt;
    while (a_it < a.end()){
        paired tmp = *a_it;
        vector<paired> d;
        while ((a_it < a.end()) && (vprod(*a_it, tmp) == 0)) {
            d.push_back(*a_it); a_it++;
        };
        sort(d.begin(), d.end(), shift_order(tmp));
        i = 0;
        while (i < d.size()){
            cnt = 1;
            while ((i < d.size() - 1) && same(d[i], d[i+1])) {
                cnt++;
                i++;
            }
            dcnt = ((sqrt(1+8*cnt)-3)*cnt)/6;
            tot -= dcnt;
            i++;
        }
    }
    cout << tot;
    return 0;

}


#include<iostream>
#include<algorithm>
#include<vector>

using namespace std;

struct point{
    int x; int y;
};

struct paired{
    point p1; point p2;
};

int vprod(paired a, paired b){
    int dxa = a.p2.x - a.p1.x;
    int dyb = b.p2.y - b.p1.y;
    int dya = a.p2.y - a.p1.y;
    int dxb = b.p2.x - b.p1.x;
    return dxa*dyb - dya*dxb;
}

bool same(paired a, paired b){
    paired na, nb;
    na.p1 = a.p1; na.p2 = b.p2;
    nb.p1 = b.p1; nb.p2 = a.p2;
    return (vprod(a, b) == 0 ) && (vprod(na, nb) == 0);
}

paired ordered(paired a){
    point c;
    int dx = a.p2.x - a.p1.x;
    int dy = a.p2.y - a.p1.y;
    if ((dy < 0) || ((dy == 0) && (dx < 0))){
        c = a.p1; a.p1 = a.p2; a.p2 = c;
    }
    return a;
}

bool rotation_order (paired a, paired b){
    return vprod(ordered(a), ordered(b)) > 0;
}

struct shift_order {
        int DX, DY;
        shift_order(paired resp) {
            this -> DX = resp.p2.y - resp.p1.y;
            this -> DY = - (resp.p2.x - resp.p1.x); };
        bool operator () (paired a, paired b){
            int dx = b.p2.x - a.p2.x;
            int dy = b.p2.y - a.p2.y;
            return dx * DX + dy * DY > 0;
        }
};

int main(){

    unsigned long int n;
    cin >> n;
    unsigned long int tot = (n*(n - 1)*(n - 2))/6;

    vector<point> p;
    point t;
    for (int i = 0; i < n; i++){
        cin >> t.x >> t.y;
        p.push_back(t);
    }

    vector<paired> a;
    paired t2;
    for (int i = 0; i < n; i++)
    for (int j = i + 1; j < n; j++){
        t2.p1 = p[i];
        t2.p2 = p[j];
        a.push_back(t2);
    }
    sort(a.begin(), a.end(), rotation_order);

    vector<paired>::iterator a_it = a.begin();
    int i;
    unsigned long int cnt, dcnt;

    while (a_it < a.end()){

        paired tmp = *a_it;
        vector<paired> d;
        while ((a_it < a.end()) && (vprod(*a_it, tmp) == 0)) {
            d.push_back(*a_it); a_it++;
        };
        sort(d.begin(), d.end(), shift_order(tmp));

        i = 0;
        while (i < d.size()){
            cnt = 1;
            while ((i < d.size() - 1) && same(d[i], d[i+1])) {
                cnt++;
                i++;
            }
            dcnt = ((sqrt(1+8*cnt)-3)*cnt)/6;
            tot -= dcnt;
            i++;
        }
    }

    cout << tot;
    return 0;

}


#include<iostream>
//#include<cstdio>
#include<algorithm>
#include<vector>
using namespace std;

struct point{ int x; int y; };
struct points_pair{ point p1; point p2; };

struct resp_comp {
        resp_comp(points_pair resp) { this->resp = resp; }
        bool operator () (points_pair a, points_pair b){
            return true;
        }
        points_pair resp;
    };

int dphi(points_pair a, points_pair b){
    return (a.p2.x - a.p1.x)*(b.p2.y - b.p1.y) - (a.p2.y - a.p1.y)*(b.p2.x - b.p1.x);
}

int dphi2(points_pair a, points_pair b){
    points_pair na, nb;
    na.p1 = a.p1; na.p2 = b.p2;
    nb.p1 = b.p1; nb.p2 = a.p2;
    return dphi(na, nb);
}

bool comp(points_pair a, points_pair b){
    if (dphi(a, b) > 0) return true;
    else return false;
};

int main(){
    int n;
    vector<point> p;
    vector<points_pair> a;
    point t;
    points_pair t2;

//    freopen("in.txt", "r", stdin);
    cin >> n;
    int tot = n*(n - 1)*(n - 2)/6;

    for (int i = 0; i < n; i++){
        cin >> t.x >> t.y;
        p.push_back(t);
    }

    for (int i = 0; i < n; i++)
    for (int j = i + 1; j < n; j++){
        t2.p1 = p[i];
        t2.p2 = p[j];
        a.push_back(t2);
    }

    sort(a.begin(), a.end(), comp);
    vector<points_pair>::iterator a_it = a.begin();

    int i, cnt;
    while (a_it < a.end()){
        points_pair tmp = *a_it;
        resp_comp order(tmp);
        vector<points_pair> d;

        while ((a_it < a.end()) && (dphi(*a_it, tmp) == 0)) {
            d.push_back(*a_it); a_it++;
        };

        sort(d.begin(), d.end(), order);
        i = 1; cnt = 1;
        while (i < d.size()){
            while ((i < d.size()) && (dphi2(d[i], d[i-1]) == 0)) {i++; cnt++; }
            i++; tot -= (sqrt(1+8*cnt)-3)*cnt/6;
        }
    }

    cout << tot;
    return 0;
}


#include<iostream>
// #include<cstdio>
#include<algorithm>
#include<vector>
using namespace std;

struct point{ int x; int y; };
struct points_pair{ point p1; point p2; };

struct resp_comp {
        resp_comp(points_pair resp) {
            this -> DX = resp.p2.y - resp.p1.y;
            this -> DY = - (resp.p2.x - resp.p1.x);
        }
        bool operator () (points_pair a, points_pair b){
            int dx = b.p2.x - a.p2.x;
            int dy = b.p2.y - a.p2.y;
            return dx * DX + dy * DY > 0;
        }
        int DX, DY;
    };

int dphi(points_pair a, points_pair b){
    return (a.p2.x - a.p1.x)*(b.p2.y - b.p1.y) - (a.p2.y - a.p1.y)*(b.p2.x - b.p1.x);
}

int dphi2(points_pair a, points_pair b){
    points_pair na, nb;
    na.p1 = a.p1; na.p2 = b.p2;
    nb.p1 = b.p1; nb.p2 = a.p2;
    return dphi(na, nb);
}

bool comp(points_pair a, points_pair b){
    if (dphi(a, b) > 0) return true;
    else return false;
};

int main(){
    unsigned long int n;
    vector<point> p;
    vector<points_pair> a;
    point t;
    points_pair t2;

//    freopen("in.txt", "r", stdin);
    cin >> n;
    unsigned long int tot = n*(n - 1)*(n - 2)/6;

    for (int i = 0; i < n; i++){
        cin >> t.x >> t.y;
        p.push_back(t);
    }

    for (int i = 0; i < n; i++)
    for (int j = i + 1; j < n; j++){
        t2.p1 = p[i];
        t2.p2 = p[j];
        a.push_back(t2);
    }

    sort(a.begin(), a.end(), comp);
    vector<points_pair>::iterator a_it = a.begin();
    int i;
    unsigned long int cnt;
    while (a_it < a.end()){
        points_pair tmp = *a_it;
        vector<points_pair> d;

        while ((a_it < a.end()) && (dphi(*a_it, tmp) == 0)) {
            d.push_back(*a_it); a_it++;
        };

        sort(d.begin(), d.end(), resp_comp(tmp));

        i = 1;
        while (i < d.size()){
            cnt = 1;
            while ((i < d.size()) && (dphi2(d[i], d[i-1]) == 0)) {i++; cnt++; }
            tot -= (sqrt(1+8*cnt)-3)*cnt/6;
            i++;
        }
    }

    cout << tot;
    return 0;
}


#include<iostream>
#include<cstdio>
#include<algorithm>
#include<vector>
using namespace std;

struct point{ int x; int y; };
struct points_pair{ point p1; point p2; };

struct resp_comp {
        resp_comp(points_pair resp) { this->resp = resp; }
        bool operator () (points_pair a, points_pair b){
            return true;
        }
        points_pair resp;
    };

int dphi(points_pair a, points_pair b){
    return (a.p2.x - a.p1.x)*(b.p2.y - b.p1.y) - (a.p2.y - a.p1.y)*(b.p2.x - b.p1.x);
}

int dphi2(points_pair a, points_pair b){
    points_pair na, nb;
    na.p1 = a.p1; na.p2 = b.p2;
    nb.p1 = b.p1; nb.p2 = a.p2;
    return dphi(na, nb);
}

bool comp(points_pair a, points_pair b){
    if (dphi(a, b) > 0) return true;
    else return false;
};

int main(){
    int n;
    vector<point> p;
    vector<points_pair> a;
    point t;
    points_pair t2;

    freopen("in.txt", "r", stdin);
    cin >> n;
    int tot = n*(n - 1)*(n - 2)/6;

    for (int i = 0; i < n; i++){
        cin >> t.x >> t.y;
        p.push_back(t);
    }

    for (int i = 0; i < n; i++)
    for (int j = i + 1; j < n; j++){
        t2.p1 = p[i];
        t2.p2 = p[j];
        a.push_back(t2);
    }

    sort(a.begin(), a.end(), comp);
    vector<points_pair>::iterator a_it = a.begin();

    int i, cnt;
    while (a_it < a.end()){
        points_pair tmp = *a_it;
        resp_comp order(tmp);
        vector<points_pair> d;

        while ((a_it < a.end()) && (dphi(*a_it, tmp) == 0)) {
            d.push_back(*a_it); a_it++;
        };

        sort(d.begin(), d.end(), order);
        i = 1; cnt = 1;
        while (i < d.size()){
            while ((i < d.size()) && (dphi2(d[i], d[i-1]) == 0)) {i++; cnt++; }
            tot -= (sqrt(1+8*cnt)-3)*cnt/6;
        }
    }

    cout << tot;
    return 0;
}


#include<iostream>
// #include<cstdio>
#include<algorithm>
#include<vector>
using namespace std;

struct point{ int x; int y; };
struct points_pair{ point p1; point p2; };

struct resp_comp {
        resp_comp(points_pair resp) {
            this -> DX = resp.p2.y - resp.p1.y;
            this -> DY = - (resp.p2.x - resp.p1.x);
        }
        bool operator () (points_pair a, points_pair b){
            int dx = b.p2.x - a.p2.x;
            int dy = b.p2.y - a.p2.y;
            return dx * DX + dy * DY > 0;
        }
        int DX, DY;
    };

int dphi(points_pair a, points_pair b){
    return (a.p2.x - a.p1.x)*(b.p2.y - b.p1.y) - (a.p2.y - a.p1.y)*(b.p2.x - b.p1.x);
}

int dphi2(points_pair a, points_pair b){
    points_pair na, nb;
    na.p1 = a.p1; na.p2 = b.p2;
    nb.p1 = b.p1; nb.p2 = a.p2;
    return dphi(na, nb);
}

bool comp(points_pair a, points_pair b){
    if (dphi(a, b) > 0) return true;
    else return false;
};

int main(){
    int n;
    vector<point> p;
    vector<points_pair> a;
    point t;
    points_pair t2;

//    freopen("in.txt", "r", stdin);
    cin >> n;
    int tot = n*(n - 1)*(n - 2)/6;

    for (int i = 0; i < n; i++){
        cin >> t.x >> t.y;
        p.push_back(t);
    }

    for (int i = 0; i < n; i++)
    for (int j = i + 1; j < n; j++){
        t2.p1 = p[i];
        t2.p2 = p[j];
        a.push_back(t2);
    }

    sort(a.begin(), a.end(), comp);
    vector<points_pair>::iterator a_it = a.begin();
    int i, cnt;
    while (a_it < a.end()){
        points_pair tmp = *a_it;
        vector<points_pair> d;

        while ((a_it < a.end()) && (dphi(*a_it, tmp) == 0)) {
            d.push_back(*a_it); a_it++;
        };

        sort(d.begin(), d.end(), resp_comp(tmp));

        i = 1;
        while (i < d.size()){
            cnt = 1;
            while ((i < d.size()) && (dphi2(d[i], d[i-1]) == 0)) {i++; cnt++; }
            tot -= (sqrt(1+8*cnt)-3)*cnt/6;
            i++;
        }
    }

    cout << tot;
    return 0;
}


#include<iostream>
// #include<cstdio>
#include<algorithm>
#include<vector>
using namespace std;

struct point{ int x; int y; };
struct points_pair{ point p1; point p2; };

struct resp_comp {
        resp_comp(points_pair resp) {
            this -> DX = resp.p2.y - resp.p1.y;
            this -> DY = - (resp.p2.x - resp.p1.x);
        }
        bool operator () (points_pair a, points_pair b){
            int dx = b.p2.x - a.p2.x;
            int dy = b.p2.y - a.p2.y;
            return dx * DX + dy * DY > 0;
        }
        int DX, DY;
    };

int dphi(points_pair a, points_pair b){
    return (a.p2.x - a.p1.x)*(b.p2.y - b.p1.y) - (a.p2.y - a.p1.y)*(b.p2.x - b.p1.x);
}

int dphi2(points_pair a, points_pair b){
    points_pair na, nb;
    na.p1 = a.p1; na.p2 = b.p2;
    nb.p1 = b.p1; nb.p2 = a.p2;
    return dphi(na, nb);
}

bool comp(points_pair a, points_pair b){
    if (dphi(a, b) > 0) return true;
    else return false;
};

int main(){
    unsigned long int n;
    vector<point> p;
    vector<points_pair> a;
    point t;
    points_pair t2;

//    freopen("in.txt", "r", stdin);
    cin >> n;
    unsigned long int tot = (n*(n - 1)*(n - 2))/6;

    for (int i = 0; i < n; i++){
        cin >> t.x >> t.y;
        p.push_back(t);
    }

    for (int i = 0; i < n; i++)
    for (int j = i + 1; j < n; j++){
        t2.p1 = p[i];
        t2.p2 = p[j];
        a.push_back(t2);
    }

    sort(a.begin(), a.end(), comp);

    vector<points_pair>::iterator a_it = a.begin();
    int i;
    unsigned long int cnt;
    while (a_it < a.end()){
        points_pair tmp = *a_it;
        vector<points_pair> d;

        while ((a_it < a.end()) && (dphi(*a_it, tmp) == 0)) {
            d.push_back(*a_it); a_it++;
        };

        sort(d.begin(), d.end(), resp_comp(tmp));

        i = 1;
        while (i < d.size()){
            cnt = 1;
            while ((i < d.size()) && (dphi2(d[i], d[i-1]) == 0)) {i++; cnt++; }
            tot -= ((sqrt(1+8*cnt)-3)*cnt)/6;
            i++;
        }
    }

    cout << tot;
    return 0;
}


#include<iostream>
#include<algorithm>
#include<vector>

using namespace std;

struct point{
    int x; int y;
};

struct paired{
    point p1; point p2;
};

int vprod(paired a, paired b){
    int dxa = a.p2.x - a.p1.x;
    int dyb = b.p2.y - b.p1.y;
    int dya = a.p2.y - a.p1.y;
    int dxb = b.p2.x - b.p1.x;
    return dxa*dyb - dya*dxb;
}

bool same(paired a, paired b){
    paired na, nb;
    na.p1 = a.p1; na.p2 = b.p2;
    nb.p1 = b.p1; nb.p2 = a.p2;
    return (vprod(a, b) && vprod(na, nb)) == 0;
}

paired ordered(paired a){
    point c;
    int dx = a.p2.x - a.p1.x;
    int dy = a.p2.y - a.p1.y;
    if ((dy < 0) || ((dy == 0) && (dx < 0))){
        c = a.p1; a.p1 = a.p2; a.p2 = c;
    }
    return a;
}

bool rotation_order (paired a, paired b){
    return vprod(ordered(a), ordered(b)) > 0;
}

struct shift_order {
        int DX, DY;
        shift_order(paired resp) {
            this -> DX = resp.p2.y - resp.p1.y;
            this -> DY = - (resp.p2.x - resp.p1.x); };
        bool operator () (paired a, paired b){
            int dx = b.p2.x - a.p2.x;
            int dy = b.p2.y - a.p2.y;
            return dx * DX + dy * DY > 0;
        }
};

int main(){

    unsigned long int n;
    cin >> n;
    unsigned long int tot = (n*(n - 1)*(n - 2))/6;

    vector<point> p;
    point t;
    for (int i = 0; i < n; i++){
        cin >> t.x >> t.y;
        p.push_back(t);
    }

    vector<paired> a;
    paired t2;
    for (int i = 0; i < n; i++)
    for (int j = i + 1; j < n; j++){
        t2.p1 = p[i];
        t2.p2 = p[j];
        a.push_back(t2);
    }
    sort(a.begin(), a.end(), rotation_order);

    vector<paired>::iterator a_it = a.begin();
    int i;
    unsigned long int cnt, dcnt;

    while (a_it < a.end()){

        paired tmp = *a_it;
        vector<paired> d;
        while ((a_it < a.end()) && (vprod(*a_it, tmp) == 0)) {
            d.push_back(*a_it); a_it++;
        };
        sort(d.begin(), d.end(), shift_order(tmp));

        i = 0;
        while (i < d.size()){
            cnt = 1;
            while ((i < d.size() - 1) && same(d[i], d[i+1])) {
                cnt++;
                i++;
            }
            dcnt = ((sqrt(1+8*cnt)-3)*cnt)/6;
            tot -= dcnt;
            i++;
        }
    }

    cout << tot;
    return 0;

}


//#include <bits/stdc++.h>
#include <iostream>
#define ii pair<int, int>

using namespace std;

int n;
ii p[2010];

int main(){
    ios_base::sync_with_stdio(0);
    cin.tie(0);

    cin >> n;
    for( int i = 1; i <= n; ++i )
        cin >> p[i].first >> p[i].second;

    int c = 0;
    for( int i = 1; i <= n; i++)
        for( int j = i + 1; j <= n; j++)
            for( int k = j + 1; k <= n; k++)
                if((p[j].first - p[i].first) * (p[k].second - p[i].second) - (p[j].second - p[i].second) * (p[k].first - p[i].first) != 0)
                    c++;

    cout << c;
}


#include <bits/stdc++.h>

#define pb push_back
#define N 2003
#define x first
#define y second

using namespace std;
typedef pair<int, int> ii;

ii point[N];

int main(){
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    int n, x, y, c = 0;
    cin >> n;
    for( int i = 0; i < n; ++i ){
        cin >> x >> y;
        point[i] = ii( x, y );
    }

    for( int i = 0; i < n; ++i )
        for( int j = i + 1; j < n; ++j )
            for( int k = j + 1; k < n; ++k )
                if((point[j].y - point[i].y) * (point[k].x - point[j].x) - (point[k].y - point[j].y) * (point[j].x - point[i].x) != 0);
                    ++c;

    cout << c << '\n';
}


#include<iostream>
#include<stdio.h>
#include<fstream>
#include<string.h>
#include<string>
#include<vector>
#include<set>
#include<map>
#include<list>
#include<deque>
#include<queue>
#include<stack>
#include<utility>
#include<sstream>
#include<bitset>
#include<math.h>
#include<algorithm>
#include<limits.h>
#include<iomanip>

#define ll long long
#define dd pair<double, double>
#define ii pair<int, ll>
#define PB push_back
#define checkk x_ >= 0 && y_ >= 0 && x_ < R && y_ < C && !seen[x_][y_]
#define MAX 3 * (int(1e5) + 10)
#define INF LONG_LONG_MAX / 6;
#define INF2 LONG_LONG_MAX / 6
#define EPS 1e-8
#define gauss(z) (ll)(z)*((z) + 1) / 2

using namespace std;

int n;
ii p[2010];

inline bool can(int i, int j, int k) {
    return ((p[j].first - p[i].first) * (p[k].second - p[i].second) - (p[j].second - p[i].second) * (p[k].first - p[i].first)) != 0;
}

int main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    //freopen("input.txt", "r", stdin)

    cin >> n;

    for(int i = 1; i <= n; i++) cin >> p[i].first >> p[i].second;

    int ans = 0;
    for(int i = 1; i <= n; i++)
        for(int j = i + 1; j <= n; j++)
            for(int k = j + 1; k <= n; k++)  /// i->j, i -> k
                if((p[j].first - p[i].first) * (p[k].second - p[i].second) != (p[j].second - p[i].second) * (p[k].first - p[i].first))
                    ans++;

    cout << ans;
}


#include <bits/stdc++.h>
#define N 2003

using namespace std;
typedef pair<int, int> ii;

int n;
ii point[N];

int main(){
    ios_base::sync_with_stdio(0);
    cin.tie(0);

    cin >> n;
    for( int i = 0; i < n; ++i )
        cin >> point[i].first >> point[i].second;

    int c = 0;
    for( int i = 0; i < n; ++i )
        for( int j = i + 1; j < n; ++j )
            for( int k = j + 1; k < n; ++k )
                if((point[j].first - point[i].second) * (point[k].first - point[j].first) - (point[k].second - point[j].second) * (point[j].first - point[i].first) != 0)
                    ++c;

    cout << c << '\n';
}


#include <bits/stdc++.h>
#define pb push_back
#define N 2003
#define x first
#define y second

using namespace std;
typedef pair<int, int> ii;

bool colinears( ii a, ii b, ii c ){
    return (b.y - a.y) * (c.x - b.x) - (c.y - b.y) * (b.x - a.x) == 0;
}

ii point[N];

int main(){
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    int n, x, y, c = 0;
    cin >> n;
    for( int i = 0; i < n; ++i )
        cin >> point[i].x >> point[i].y;

    for( int i = 0; i < n; ++i )
        for( int j = i + 1; j < n; ++j )
            for( int k = j + 1; k < n; ++k )
                if((point[j].y - point[i].y) * (point[k].x - point[j].x) - (point[k].y - point[j].y) * (point[j].x - point[i].x) != 0)
                    ++c;

    cout << c << '\n';
}


#include <bits/stdc++.h>
#define pb push_back
#define N 2003
#define x first
#define y second

using namespace std;
typedef pair<int, int> ii;

bool colinears( ii a, ii b, ii c ){
    return (b.y - a.y) * (c.x - b.x) - (c.y - b.y) * (b.x - a.x) == 0;
}

ii point[N];

int main(){
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    int n, x, y, c = 0;
    cin >> n;
    for( int i = 0; i < n; ++i ){
        cin >> x >> y;
        point[i] = ii( x, y );
    }

    for( int i = 0; i < n; ++i )
        for( int j = i + 1; j < n; ++j )
            for( int k = j + 1; k < n; ++k )
                if((point[j].y - point[i].y) * (point[k].x - point[j].x) - (point[k].y - point[j].y) * (point[j].x - point[i].x) != 0)
                    ++c;

    cout << c << '\n';
}


#include<bits/stdc++.h>

#define ii pair<int, ll>

using namespace std;

int n;
ii p[2010];

inline bool can(int i, int j, int k) {
    return ((p[j].first - p[i].first) * (p[k].second - p[i].second) - (p[j].second - p[i].second) * (p[k].first - p[i].first)) != 0;
}

int main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    //freopen("input.txt", "r", stdin)

    cin >> n;

    for(int i = 1; i <= n; i++) cin >> p[i].first >> p[i].second;

    int ans = 0;
    for(int i = 1; i <= n; i++)
        for(int j = i + 1; j <= n; j++)
            for(int k = j + 1; k <= n; k++)  /// i->j, i -> k
                if((p[j].first - p[i].first) * (p[k].second - p[i].second) != (p[j].second - p[i].second) * (p[k].first - p[i].first))
                    ans++;

    cout << ans;
}


#include <bits/stdc++.h>
//#include <iostream>
#define ii pair<int, int>

using namespace std;

int n;
ii point[2010];

int main(){
    ios_base::sync_with_stdio(0);
    cin.tie(0);

    cin >> n;
    for( int i = 1; i <= n; ++i )
        cin >> point[i].first >> point[i].second;

    int c = 0;
    for( int i = 1; i <= n; i++ )
        for( int j = i + 1; j <= n; j++ )
            for( int k = j + 1; k <= n; k++ )
                if((point[j].second - point[i].second) * (point[k].first - point[j].first) - (point[k].second - point[j].second) * (point[j].first - point[i].first) != 0)
                    c++;

    cout << c;
}


#include <iostream>

#define ii pair<int, int>

using namespace std;

int n;
ii p[2010];

int main(){
    ios_base::sync_with_stdio(0);
    cin.tie(0);

    cin >> n;
    for( int i = 1; i <= n; ++i )
        cin >> p[i].first >> p[i].second;

    int c = 0;
    for( int i = 1; i <= n; i++)
        for( int j = i + 1; j <= n; j++)
            for( int k = j + 1; k <= n; k++)
                if((p[j].first - p[i].first) * (p[k].second - p[i].second) - (p[j].second - p[i].second) * (p[k].first - p[i].first) != 0)
                    c++;

    cout << c;
}

#include<bits/stdc++.h>
#define ii pair<int, int>

using namespace std;

int n;
ii p[2010];

int main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);

    cin >> n;

    for(int i = 1; i <= n; i++) cin >> p[i].first >> p[i].second;

    int ans = 0;
    for(int i = 1; i <= n; i++)
        for(int j = i + 1; j <= n; j++)
            for(int k = j + 1; k <= n; k++)  /// i->j, i -> k
                if((p[j].first - p[i].first) * (p[k].second - p[i].second) - (p[j].second - p[i].second) * (p[k].first - p[i].first) != 0)
                    ans++;

    cout << ans;
}


#include <bits/stdc++.h>
#define pb push_back
#define mp make_pair
#define N 2003
#define x first
#define y second

using namespace std;
typedef pair<int, int> ii;

bool colinears( ii a, ii b, ii c ){
    return (b.y - a.y) * (c.x - b.x) - (c.y - b.y) * (b.x - a.x) == 0;
}

ii point[N];

int main(){
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    int n, x, y, c = 0;
    cin >> n;
    for( int i = 0; i < n; ++i ){
        cin >> x >> y;
        point[i] = mp( x, y );
    }

    for( int i = 0; i < n; ++i )
        for( int j = i + 1; j < n; ++j )
            for( int k = j + 1; k < n; ++k )
                if( !colinears( point[i], point[j], point[k] ) )
                    ++c;

    cout << c << '\n';
}


#include <bits/stdc++.h>
//#include <iostream>
#define N 2003

using namespace std;
typedef pair<int, int> ii;

int n;
ii point[N];

int main(){
    ios_base::sync_with_stdio(0);
    cin.tie(0);

    cin >> n;
    for( int i = 0; i < n; ++i )
        cin >> point[i].first >> point[i].second;

    int c = 0;
    for( int i = 0; i < n; ++i )
        for( int j = i + 1; j < n; ++j )
            for( int k = j + 1; k < n; ++k )
                if((point[j].second - point[i].second) * (point[k].first - point[j].first) - (point[k].second - point[j].second) * (point[j].first - point[i].first) != 0)
                    ++c;

    cout << c << '\n';
}


#include<bits/stdc++.h>
#define ii pair<int, ll>

using namespace std;

int n;
ii p[2010];

int main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    //freopen("input.txt", "r", stdin)

    cin >> n;

    for(int i = 1; i <= n; i++) cin >> p[i].first >> p[i].second;

    int ans = 0;
    for(int i = 1; i <= n; i++)
        for(int j = i + 1; j <= n; j++)
            for(int k = j + 1; k <= n; k++)  /// i->j, i -> k
                if((p[j].first - p[i].first) * (p[k].second - p[i].second) - (p[j].second - p[i].second) * (p[k].first - p[i].first) != 0)
                    ans++;

    cout << ans;
}


#include <bits/stdc++.h>
#define pb push_back
#define N 2003
#define x first
#define y second

using namespace std;
typedef pair<int, int> ii;

bool colinears( ii a, ii b, ii c ){
    return (b.y - a.y) * (c.x - b.x) - (c.y - b.y) * (b.x - a.x) == 0;
}

ii point[N];

int main(){
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    int n, x, y, c = 0;
    cin >> n;
    for( int i = 0; i < n; ++i ){
        cin >> x >> y;
        point[i] = ii( x, y );
    }

    for( int i = 0; i < n; ++i )
        for( int j = i + 1; j < n; ++j )
            for( int k = j + 1; k < n; ++k )
                if( !colinears( point[i], point[j], point[k] ) )
                    ++c;

    cout << c << '\n';
}


#include <bits/stdc++.h>
//#include <iostream>
#define N 2003

using namespace std;
typedef pair<int, int> ii;

int n;
ii point[2010];

int main(){
    ios_base::sync_with_stdio(0);
    cin.tie(0);

    cin >> n;
    for( int i = 1; i <= n; ++i )
        cin >> point[i].first >> point[i].second;

    int c = 0;
    for( int i = 1; i <= n; i++ )
        for( int j = i + 1; j <= n; j++ )
            for( int k = j + 1; k <= n; k++ )
                if((point[j].second - point[i].second) * (point[k].first - point[j].first) - (point[k].second - point[j].second) * (point[j].first - point[i].first) != 0)
                    c++;

    cout << c;
}


#include<bits/stdc++.h>

#define ii pair<int, long long>

using namespace std;

int n;
ii p[2010];

inline bool can(int i, int j, int k) {
    return ((p[j].first - p[i].first) * (p[k].second - p[i].second) - (p[j].second - p[i].second) * (p[k].first - p[i].first)) != 0;
}

int main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    //freopen("input.txt", "r", stdin)

    cin >> n;

    for(int i = 1; i <= n; i++) cin >> p[i].first >> p[i].second;

    int ans = 0;
    for(int i = 1; i <= n; i++)
        for(int j = i + 1; j <= n; j++)
            for(int k = j + 1; k <= n; k++)  /// i->j, i -> k
                if((p[j].first - p[i].first) * (p[k].second - p[i].second) != (p[j].second - p[i].second) * (p[k].first - p[i].first))
                    ans++;

    cout << ans;
}


#include<bits/stdc++.h>
#define ii pair<int, int>

using namespace std;

int n;
ii p[2010];

int main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);

    cin >> n;

    for(int i = 1; i <= n; i++) cin >> p[i].first >> p[i].second;

    int ans = 0;
    for(int i = 1; i <= n; i++)
        for(int j = i + 1; j <= n; j++)
            for(int k = j + 1; k <= n; k++)  /// i->j, i -> k
                if((p[j].first - p[i].first) * (p[k].second - p[i].second) - (p[j].second - p[i].second) * (p[k].first - p[i].first) != 0)
                    ans++;

    cout << ans;
}


#include <iostream>
using namespace std;

int n;
int *px, *py;
int rez=0;

int main()
{
    ios_base::sync_with_stdio(0);
    cin>>n;
    if(n<3)
    {
        cout<<"0"<<endl;
        return 0;
    }
    px = new int[n];
    py = new int[n];
    for(int i=0; i<n; ++i)
    {
        cin>>px[i]>>py[i];
    }
    for(int i=0; i<n; ++i)
    {
        for(int j=i+1; j<n; ++j)
        {
            int a = py[i] - py[j];
            int b = px[j] - px[i];
            int c = -a*px[i] - b*py[i];
            for(int k=j+1; k<n; ++k)
            {
                if(a*px[k]+b*py[k]+c!=0)
                    ++rez;
            }
        }
    }
    cout<<rez<<endl;
    delete[] px;
    delete[] py;
    return 0;
}


#include <iostream>
#include <vector>
using namespace std;

int n;
vector<int> px(3000), py(3000);
int rez=0;

int main()
{
    ios_base::sync_with_stdio(0);
    cin>>n;
    if(n<3)
    {
        cout<<"0"<<endl;
        return 0;
    }
    //px = new int[n];
    //py = new int[n];
    for(int i=0; i<n; ++i)
    {
        cin>>px[i]>>py[i];
    }
    for(int i=0; i<n; ++i)
    {
        for(int j=i+1; j<n; ++j)
        {
            int a = py[i] - py[j];
            int b = px[j] - px[i];
            int c = -a*px[i] - b*py[i];
            for(int k=j+1; k<n; ++k)
            {
                if(a*px[k]+b*py[k]+c!=0)
                    ++rez;
            }
        }
    }
    cout<<rez<<endl;
    //delete[] px;
    //delete[] py;
    return 0;
}


#include <iostream>
using namespace std;

int n;
int *px, *py;
int rez=0;

int main()
{
    //ios_base::sync_with_stdio(0);
    cin>>n;
    if(n<3)
    {
        cout<<"0"<<endl;
        return 0;
    }
    px = new int[n];
    py = new int[n];
    for(int i=0; i<n; ++i)
    {
        cin>>px[i]>>py[i];
    }
    for(int i=0; i<n; ++i)
    {
        for(int j=i+1; j<n; ++j)
        {
            int a = py[i] - py[j];
            int b = px[j] - px[i];
            int c = -a*px[i] - b*py[i];
            for(int k=j+1; k<n; ++k)
            {
                if(a*px[k]+b*py[k]+c!=0)
                    ++rez;
            }
        }
    }
    cout<<rez<<endl;
    delete[] px;
    delete[] py;
    return 0;
}


#include <iostream>
using namespace std;

int n;
int px[3000], py[3000];
int rez=0;

int main()
{
    ios_base::sync_with_stdio(0);
    cin>>n;
    if(n<3)
    {
        cout<<"0"<<endl;
        return 0;
    }
    //px = new int[n];
    //py = new int[n];
    for(int i=0; i<n; ++i)
    {
        cin>>px[i]>>py[i];
    }
    for(int i=0; i<n; ++i)
    {
        for(int j=i+1; j<n; ++j)
        {
            int a = py[i] - py[j];
            int b = px[j] - px[i];
            int c = -a*px[i] - b*py[i];
            for(int k=j+1; k<n; ++k)
            {
                if(a*px[k]+b*py[k]+c!=0)
                    ++rez;
            }
        }
    }
    cout<<rez<<endl;
    //delete[] px;
    //delete[] py;
    return 0;
}


#include <cstdio>
#include <iostream>
#include <map>
#include <set>
#include <utility>
#include <deque>
#include <string>
#include <cmath>
#include <algorithm>
#include <vector>
using namespace std;

//vector<vector<int> > v(100);
//void f(int a, int b, int c, int d)
//{
//  --a,--b,--c,--d;
//  for(int i=a; i<=c;++i)
//      for(int j=b;j<=d;++j)
//          ++v[i][j];
//}
//
//int Sum()
//{
//  int s=0;
//  for(int i=0;i<100;++i)
//      for(int j=0;j<100;++j)
//          s+=v[i][j];
//  return s;
//}
//
//
//
//int main()
//{
//
//  ios_base::sync_with_stdio(0);
//  for(int i=0;i<100;++i)
//      v[i].resize(100);
//
//  for(int i=0;i<100;++i)
//      for(int j=0;j<100;++j)
//          v[i][j]=0;
//
//  int n;
//  cin>>n;
//  int a,b,c,d;
//  for(int i=0;i<n;++i)
//  {
//      cin>>a>>b>>c>>d;
//      f(a,b,c,d);
//  }
//  int s=Sum();
//  cout<<s<<endl;
//
//
//
//
//  return 0;
//}

//
//int main()
//{
//  long long n;
//  cin>>n;
//  long long l=1;
//  long long r=9;
//  long long k=1;
//  long long sum=0;
//  while(n-r>=0)
//  {
//      sum+=(r-l+1)*k;
//  //  n-=r;
//      r=r*10+9;
//      l*=10;
//      ++k;
//  }
//  sum+=(n-l+1)*k;
//  cout<<sum<<endl;
//  return 0;
//}

int n;
vector<pair<int,int> > v;
vector<bool> wasted;

long long Calc(int n)
{
    long long sum=0;
    while(n>1)
    {
        sum+=(n*(n-1))/2;
        --n;
    }
    return sum;
}

inline bool areOnLine(int a, int b, int c, pair<int, int> p)
{
    if(a*p.first+b*p.second+c==0)
        return true;
    return false;
}

vector<int> OnLine()
{
    vector<int> answ;
    answ.reserve(200);
    for(int i=0;i<n;++i)
        for(int j=0;j<n;++j)
        {
            if(!wasted[i] || !wasted[j])
            {
                int A=v[i].second-v[j].second;
                int B=v[j].first-v[i].first;
                int C=-A*v[i].first-B*v[i].second;
                int s=2;
                for(int k=0;k<n;++k)
                {
                    if(k!=i && k!=j)
                    {
                        if(areOnLine(A,B,C,v[k]))
                        {
                            wasted[i]=wasted[j]=wasted[k]=true;
                            ++s;
                        }
                    }
                }
                if(s>2)
                    {
                        answ.push_back(s);
                    }
            }
        }
    return answ;
}

int main()
{
    ios_base::sync_with_stdio(0);
    cin>>n;
    v.reserve(n);
    wasted.assign(n,false);
    int x,y;
    for(int i=0;i<n;++i)
    {
        cin>>x>>y;
        v.push_back(make_pair(x,y));
    }
    long long answ = Calc(n-1);
    vector<int> vct = OnLine();
    for(int q=0;q<vct.size();++q)
    {
        answ-=Calc(vct[q]-1);
    }
    cout<<answ<<endl;
    return 0;
}

/*
3
0 0
0 1
0 2
*/

/*
5
0 0
1 0
2 0
0 1
0 -1
*/

/*
4
0 0
1 0
2 0
0 1
*/


#include <cstdio>
#include <iostream>
#include <map>
#include <set>
#include <utility>
#include <deque>
#include <string>
#include <cmath>
#include <algorithm>
#include <vector>
using namespace std;

//vector<vector<int> > v(100);
//void f(int a, int b, int c, int d)
//{
//  --a,--b,--c,--d;
//  for(int i=a; i<=c;++i)
//      for(int j=b;j<=d;++j)
//          ++v[i][j];
//}
//
//int Sum()
//{
//  int s=0;
//  for(int i=0;i<100;++i)
//      for(int j=0;j<100;++j)
//          s+=v[i][j];
//  return s;
//}
//
//
//
//int main()
//{
//
//  ios_base::sync_with_stdio(0);
//  for(int i=0;i<100;++i)
//      v[i].resize(100);
//
//  for(int i=0;i<100;++i)
//      for(int j=0;j<100;++j)
//          v[i][j]=0;
//
//  int n;
//  cin>>n;
//  int a,b,c,d;
//  for(int i=0;i<n;++i)
//  {
//      cin>>a>>b>>c>>d;
//      f(a,b,c,d);
//  }
//  int s=Sum();
//  cout<<s<<endl;
//
//
//
//
//  return 0;
//}

//
//int main()
//{
//  long long n;
//  cin>>n;
//  long long l=1;
//  long long r=9;
//  long long k=1;
//  long long sum=0;
//  while(n-r>=0)
//  {
//      sum+=(r-l+1)*k;
//  //  n-=r;
//      r=r*10+9;
//      l*=10;
//      ++k;
//  }
//  sum+=(n-l+1)*k;
//  cout<<sum<<endl;
//  return 0;
//}

int n;
vector<pair<int,int> > v;
vector<bool> wasted;

long long Calc(int n)
{
    long long sum=0;
    while(n>1)
    {
        sum+=(n*(n-1))/2;
        --n;
    }
    return sum;
}

inline bool areOnLine(int a, int b, int c, pair<int, int> p)
{
    if(a*p.first+b*p.second+c==0)
        return true;
    return false;
}

vector<int> OnLine()
{
    vector<int> answ;
    answ.reserve(200);
    for(int i=0;i<n;++i)
        for(int j=0;j<n;++j)
        {
            if(!wasted[i] && !wasted[j])
            {
                int A=v[i].second-v[j].second;
                int B=v[j].first-v[i].first;
                int C=-A*v[i].first-B*v[i].second;
                int s=2;
                for(int k=0;k<n;++k)
                {
                    if(k!=i && k!=j)
                    {
                        if(areOnLine(A,B,C,v[k]))
                        {
                            wasted[i]=wasted[j]=wasted[k]=true;
                            ++s;
                        }
                    }
                }
                if(s>2)
                    {
                        answ.push_back(s);
                    }
            }
        }
    return answ;
}

int main()
{
    ios_base::sync_with_stdio(0);
    cin>>n;
    v.reserve(n);
    wasted.assign(n,false);
    int x,y;
    for(int i=0;i<n;++i)
    {
        cin>>x>>y;
        v.push_back(make_pair(x,y));
    }
    long long answ = Calc(n-1);
    vector<int> vct = OnLine();
    for(int q=0;q<vct.size();++q)
    {
        answ-=Calc(vct[q]-1);
    }
    cout<<answ<<endl;
    return 0;
}

/*
3
0 0
0 1
0 2
*/

/*
5
0 0
1 0
2 0
0 1
0 -1
*/

/*
4
0 0
1 0
2 0
0 1
*/


#include <cstdio>
#include <iostream>
#include <map>
#include <set>
#include <utility>
#include <deque>
#include <string>
#include <cmath>
#include <algorithm>
#include <vector>
using namespace std;

//vector<vector<int> > v(100);
//void f(int a, int b, int c, int d)
//{
//  --a,--b,--c,--d;
//  for(int i=a; i<=c;++i)
//      for(int j=b;j<=d;++j)
//          ++v[i][j];
//}
//
//int Sum()
//{
//  int s=0;
//  for(int i=0;i<100;++i)
//      for(int j=0;j<100;++j)
//          s+=v[i][j];
//  return s;
//}
//
//
//
//int main()
//{
//
//  ios_base::sync_with_stdio(0);
//  for(int i=0;i<100;++i)
//      v[i].resize(100);
//
//  for(int i=0;i<100;++i)
//      for(int j=0;j<100;++j)
//          v[i][j]=0;
//
//  int n;
//  cin>>n;
//  int a,b,c,d;
//  for(int i=0;i<n;++i)
//  {
//      cin>>a>>b>>c>>d;
//      f(a,b,c,d);
//  }
//  int s=Sum();
//  cout<<s<<endl;
//
//
//
//
//  return 0;
//}

//
//int main()
//{
//  long long n;
//  cin>>n;
//  long long l=1;
//  long long r=9;
//  long long k=1;
//  long long sum=0;
//  while(n-r>=0)
//  {
//      sum+=(r-l+1)*k;
//  //  n-=r;
//      r=r*10+9;
//      l*=10;
//      ++k;
//  }
//  sum+=(n-l+1)*k;
//  cout<<sum<<endl;
//  return 0;
//}

int n;
vector<pair<int,int> > v;
vector<bool> wasted;

long long Calc(int n)
{
    long long sum=0;
    while(n>1)
    {
        sum+=(n*(n-1))/2;
        --n;
    }
    return sum;
}

inline bool areOnLine(int a, int b, int c, pair<int, int> p)
{
    if(a*p.first+b*p.second+c==0)
        return true;
    return false;
}

vector<int> OnLine()
{
    vector<int> answ;
    answ.reserve(200);
    for(int i=0;i<n;++i)
        for(int j=i+1;j<n;++j)
        {
            if(!wasted[i] && !wasted[j])
            {
                int A=v[i].second-v[j].second;
                int B=v[j].first-v[i].first;
                int C=-A*v[i].first-B*v[i].second;
                int s=2;
                for(int k=0;k<n;++k)
                {
                    if(k!=i && k!=j)
                    {
                        if(areOnLine(A,B,C,v[k]))
                        {
                            wasted[i]=wasted[j]=wasted[k]=true;
                            ++s;
                        }
                    }
                    if(k>2)
                    {
                        answ.push_back(s);
                    }
                }
            }
        }
    return answ;
}

int main()
{
    ios_base::sync_with_stdio(0);
    cin>>n;
    v.reserve(n);
    wasted.assign(n,false);
    int x,y;
    for(int i=0;i<n;++i)
    {
        cin>>x>>y;
        v.push_back(make_pair(x,y));
    }
    long long answ = Calc(n-1);
    vector<int> vct = OnLine();
    for(int q=0;q<vct.size();++q)
    {
        answ-=Calc(vct[q]-1);
    }
    cout<<answ<<endl;
    return 0;
}


#include <cstdio>
#include <iostream>
#include <map>
#include <set>
#include <utility>
#include <deque>
#include <string>
#include <cmath>
#include <algorithm>
#include <vector>
using namespace std;

//vector<vector<int> > v(100);
//void f(int a, int b, int c, int d)
//{
//  --a,--b,--c,--d;
//  for(int i=a; i<=c;++i)
//      for(int j=b;j<=d;++j)
//          ++v[i][j];
//}
//
//int Sum()
//{
//  int s=0;
//  for(int i=0;i<100;++i)
//      for(int j=0;j<100;++j)
//          s+=v[i][j];
//  return s;
//}
//
//
//
//int main()
//{
//
//  ios_base::sync_with_stdio(0);
//  for(int i=0;i<100;++i)
//      v[i].resize(100);
//
//  for(int i=0;i<100;++i)
//      for(int j=0;j<100;++j)
//          v[i][j]=0;
//
//  int n;
//  cin>>n;
//  int a,b,c,d;
//  for(int i=0;i<n;++i)
//  {
//      cin>>a>>b>>c>>d;
//      f(a,b,c,d);
//  }
//  int s=Sum();
//  cout<<s<<endl;
//
//
//
//
//  return 0;
//}

//
//int main()
//{
//  long long n;
//  cin>>n;
//  long long l=1;
//  long long r=9;
//  long long k=1;
//  long long sum=0;
//  while(n-r>=0)
//  {
//      sum+=(r-l+1)*k;
//  //  n-=r;
//      r=r*10+9;
//      l*=10;
//      ++k;
//  }
//  sum+=(n-l+1)*k;
//  cout<<sum<<endl;
//  return 0;
//}

int n;
vector<pair<int,int> > v;
vector<bool> wasted;

long long Calc(int n)
{
    long long sum=0;
    while(n>1)
    {
        sum+=(n*(n-1))/2;
        --n;
    }
    return sum;
}

inline bool areOnLine(int a, int b, int c, pair<int, int> p)
{
    if(a*p.first+b*p.second+c==0)
        return true;
    return false;
}

vector<int> OnLine()
{
    vector<int> answ;
    answ.reserve(200);
    for(int i=0;i<n;++i)
        for(int j=i+1;j<n;++j)
        {
            if(!wasted[i] && !wasted[j])
            {
                int A=v[i].second-v[j].second;
                int B=v[j].first-v[i].first;
                int C=-A*v[i].first-B*v[i].second;
                int s=2;
                for(int k=0;k<n;++k)
                {
                    if(k!=i || k!=j)
                    {
                        if(areOnLine(A,B,C,v[k]))
                        {
                            wasted[i]=wasted[j]=wasted[k]=true;
                            ++s;
                        }
                    }
                }
                if(s>2)
                    {
                        answ.push_back(s);
                    }
            }
        }
    return answ;
}

int main()
{
    ios_base::sync_with_stdio(0);
    cin>>n;
    v.reserve(n);
    wasted.assign(n,false);
    int x,y;
    for(int i=0;i<n;++i)
    {
        cin>>x>>y;
        v.push_back(make_pair(x,y));
    }
    long long answ = Calc(n-1);
    vector<int> vct = OnLine();
    for(int q=0;q<vct.size();++q)
    {
        answ-=Calc(vct[q]-1);
    }
    cout<<answ<<endl;
    return 0;
}

/*
3
0 0
0 1
0 2
*/

/*
5
0 0
1 0
2 0
0 1
0 -1
*/

/*
4
0 0
1 0
2 0
0 1
*/


#include <cstdio>
#include <iostream>
#include <map>
#include <set>
#include <utility>
#include <deque>
#include <string>
#include <cmath>
#include <algorithm>
#include <vector>
using namespace std;

//vector<vector<int> > v(100);
//void f(int a, int b, int c, int d)
//{
//  --a,--b,--c,--d;
//  for(int i=a; i<=c;++i)
//      for(int j=b;j<=d;++j)
//          ++v[i][j];
//}
//
//int Sum()
//{
//  int s=0;
//  for(int i=0;i<100;++i)
//      for(int j=0;j<100;++j)
//          s+=v[i][j];
//  return s;
//}
//
//
//
//int main()
//{
//
//  ios_base::sync_with_stdio(0);
//  for(int i=0;i<100;++i)
//      v[i].resize(100);
//
//  for(int i=0;i<100;++i)
//      for(int j=0;j<100;++j)
//          v[i][j]=0;
//
//  int n;
//  cin>>n;
//  int a,b,c,d;
//  for(int i=0;i<n;++i)
//  {
//      cin>>a>>b>>c>>d;
//      f(a,b,c,d);
//  }
//  int s=Sum();
//  cout<<s<<endl;
//
//
//
//
//  return 0;
//}

//
//int main()
//{
//  long long n;
//  cin>>n;
//  long long l=1;
//  long long r=9;
//  long long k=1;
//  long long sum=0;
//  while(n-r>=0)
//  {
//      sum+=(r-l+1)*k;
//  //  n-=r;
//      r=r*10+9;
//      l*=10;
//      ++k;
//  }
//  sum+=(n-l+1)*k;
//  cout<<sum<<endl;
//  return 0;
//}

int n;
vector<pair<int,int> > v;
vector<bool> wasted;

long long Calc(int n)
{
    long long sum=0;
    while(n>1)
    {
        sum+=(n*(n-1))/2;
        --n;
    }
    return sum;
}

inline bool areOnLine(int a, int b, int c, pair<int, int> p)
{
    if(a*p.first+b*p.second+c==0)
        return true;
    return false;
}

vector<int> OnLine()
{
    vector<int> answ;
    answ.reserve(200);
    for(int i=0;i<n;++i)
        for(int j=i+1;j<n;++j)
        {
            if(!wasted[i] || !wasted[j])
            {
                int A=v[i].second-v[j].second;
                int B=v[j].first-v[i].first;
                int C=-A*v[i].first-B*v[i].second;
                int s=2;
                for(int k=0;k<n;++k)
                {
                    if(k!=i && k!=j)
                    {
                        if(areOnLine(A,B,C,v[k]))
                        {
                            wasted[i]=wasted[j]=wasted[k]=true;
                            ++s;
                        }
                    }
                }
                if(s>2)
                    {
                        answ.push_back(s);
                    }
            }
        }
    return answ;
}

int main()
{
    ios_base::sync_with_stdio(0);
    cin>>n;
    v.reserve(n);
    wasted.assign(n,false);
    int x,y;
    for(int i=0;i<n;++i)
    {
        cin>>x>>y;
        v.push_back(make_pair(x,y));
    }
    long long answ = Calc(n-1);
    vector<int> vct = OnLine();
    for(int q=0;q<vct.size();++q)
    {
        answ-=Calc(vct[q]-1);
    }
    cout<<answ<<endl;
    return 0;
}

/*
3
0 0
0 1
0 2
*/

/*
5
0 0
1 0
2 0
0 1
0 -1
*/

/*
4
0 0
1 0
2 0
0 1
*/


#include <cstdio>
#include <iostream>
#include <map>
#include <set>
#include <utility>
#include <deque>
#include <string>
#include <cmath>
#include <algorithm>
#include <vector>
using namespace std;

//vector<vector<int> > v(100);
//void f(int a, int b, int c, int d)
//{
//  --a,--b,--c,--d;
//  for(int i=a; i<=c;++i)
//      for(int j=b;j<=d;++j)
//          ++v[i][j];
//}
//
//int Sum()
//{
//  int s=0;
//  for(int i=0;i<100;++i)
//      for(int j=0;j<100;++j)
//          s+=v[i][j];
//  return s;
//}
//
//
//
//int main()
//{
//
//  ios_base::sync_with_stdio(0);
//  for(int i=0;i<100;++i)
//      v[i].resize(100);
//
//  for(int i=0;i<100;++i)
//      for(int j=0;j<100;++j)
//          v[i][j]=0;
//
//  int n;
//  cin>>n;
//  int a,b,c,d;
//  for(int i=0;i<n;++i)
//  {
//      cin>>a>>b>>c>>d;
//      f(a,b,c,d);
//  }
//  int s=Sum();
//  cout<<s<<endl;
//
//
//
//
//  return 0;
//}

//
//int main()
//{
//  long long n;
//  cin>>n;
//  long long l=1;
//  long long r=9;
//  long long k=1;
//  long long sum=0;
//  while(n-r>=0)
//  {
//      sum+=(r-l+1)*k;
//  //  n-=r;
//      r=r*10+9;
//      l*=10;
//      ++k;
//  }
//  sum+=(n-l+1)*k;
//  cout<<sum<<endl;
//  return 0;
//}

int n;
vector<pair<int,int> > v;
vector<bool> wasted;

long long Calc(int n)
{
    long long sum=0;
    while(n>1)
    {
        sum+=(n*(n-1))/2;
        --n;
    }
    return sum;
}

inline bool areOnLine(int a, int b, int c, pair<int, int> p)
{
    if(a*p.first+b*p.second+c==0)
        return true;
    return false;
}

vector<int> OnLine()
{
    vector<int> answ;
    answ.reserve(200);
    for(int i=0;i<n;++i)
        for(int j=i+1;j<n;++j)
        {
            if(!wasted[i] && !wasted[j])
            {
                int A=v[i].second-v[j].second;
                int B=v[j].first-v[i].first;
                int C=-A*v[i].first-B*v[i].second;
                int s=2;
                for(int k=0;k<n;++k)
                {
                    if(k!=i && k!=j)
                    {
                        if(areOnLine(A,B,C,v[k]))
                        {
                            wasted[i]=wasted[j]=wasted[k]=true;
                            ++s;
                        }
                    }
                    if(s>2)
                    {
                        answ.push_back(s);
                    }
                }
            }
        }
    return answ;
}

int main()
{
    ios_base::sync_with_stdio(0);
    cin>>n;
    v.reserve(n);
    wasted.assign(n,false);
    int x,y;
    for(int i=0;i<n;++i)
    {
        cin>>x>>y;
        v.push_back(make_pair(x,y));
    }
    long long answ = Calc(n-1);
    vector<int> vct = OnLine();
    for(int q=0;q<vct.size();++q)
    {
        answ-=Calc(vct[q]-1);
    }
    cout<<answ<<endl;
    return 0;
}

/*
3
0 0
0 1
0 2
*/


#include <cstdio>
#include <iostream>
#include <map>
#include <set>
#include <utility>
#include <deque>
#include <string>
#include <cmath>
#include <algorithm>
#include <vector>
using namespace std;

//vector<vector<int> > v(100);
//void f(int a, int b, int c, int d)
//{
//  --a,--b,--c,--d;
//  for(int i=a; i<=c;++i)
//      for(int j=b;j<=d;++j)
//          ++v[i][j];
//}
//
//int Sum()
//{
//  int s=0;
//  for(int i=0;i<100;++i)
//      for(int j=0;j<100;++j)
//          s+=v[i][j];
//  return s;
//}
//
//
//
//int main()
//{
//
//  ios_base::sync_with_stdio(0);
//  for(int i=0;i<100;++i)
//      v[i].resize(100);
//
//  for(int i=0;i<100;++i)
//      for(int j=0;j<100;++j)
//          v[i][j]=0;
//
//  int n;
//  cin>>n;
//  int a,b,c,d;
//  for(int i=0;i<n;++i)
//  {
//      cin>>a>>b>>c>>d;
//      f(a,b,c,d);
//  }
//  int s=Sum();
//  cout<<s<<endl;
//
//
//
//
//  return 0;
//}

//
//int main()
//{
//  long long n;
//  cin>>n;
//  long long l=1;
//  long long r=9;
//  long long k=1;
//  long long sum=0;
//  while(n-r>=0)
//  {
//      sum+=(r-l+1)*k;
//  //  n-=r;
//      r=r*10+9;
//      l*=10;
//      ++k;
//  }
//  sum+=(n-l+1)*k;
//  cout<<sum<<endl;
//  return 0;
//}

int n;
vector<pair<int,int> > v;
vector<bool> wasted;

long long Calc(int n)
{
    long long sum=0;
    while(n>1)
    {
        sum+=(n*(n-1))/2;
        --n;
    }
    return sum;
}

inline bool areOnLine(int a, int b, int c, pair<int, int> p)
{
    if(a*p.first+b*p.second+c==0)
        return true;
    return false;
}

vector<int> OnLine()
{
    vector<int> answ;
    answ.reserve(200);
    for(int i=0;i<n;++i)
        for(int j=i+1;j<n;++j)
        {
            if(!wasted[i] && !wasted[j])
            {
                int A=v[i].second-v[j].second;
                int B=v[j].first-v[i].first;
                int C=-A*v[i].first-B*v[i].second;
                int s=2;
                for(int k=0;k<n;++k)
                {
                    if(k!=i && k!=j)
                    {
                        if(areOnLine(A,B,C,v[k]))
                        {
                            wasted[i]=wasted[j]=wasted[k]=true;
                            ++s;
                        }
                    }
                }
                if(s>2)
                    {
                        answ.push_back(s);
                    }
            }
        }
    return answ;
}

int main()
{
    ios_base::sync_with_stdio(0);
    cin>>n;
    v.reserve(n);
    wasted.assign(n,false);
    int x,y;
    for(int i=0;i<n;++i)
    {
        cin>>x>>y;
        v.push_back(make_pair(x,y));
    }
    long long answ = Calc(n-1);
    vector<int> vct = OnLine();
    for(int q=0;q<vct.size();++q)
    {
        answ-=Calc(vct[q]-1);
    }
    cout<<answ<<endl;
    return 0;
}

/*
3
0 0
0 1
0 2
*/

/*
5
0 0
1 0
2 0
0 1
0 -1
*/


#include <algorithm>
#include <iostream>
#include <sstream>
#include <utility>
#include <cstdlib>
#include <cstring>
#include <cassert>
#include <fstream>
#include <cstdio>
#include <string>
#include <vector>
#include <queue>
#include <cmath>
#include <ctime>
#include <stack>
#include <map>
#include <set>

using namespace std;

#define pb push_back
#define ppb pop_back
#define mp make_pair
#define fs first
#define sc second
#define abs(a) ((a) < 0 ? -(a) : (a))
#define sqr(a) ((a) * (a))

typedef unsigned int uint;
typedef long long ll;
typedef unsigned long long ull;

const double eps = 1e-9;
const int mod = (int)1e+9 + 7;
const double pi = acos(-1.);
const int maxn = 100100;

int x[maxn], y[maxn];
map<pair<pair<int, int>, pair<int, int> >, int> ma;

int main() {

	#ifdef SOL
	{
//		freopen("input.txt","r",stdin);
//		freopen("output.txt","w",stdout);
	}
	#else
	{
		srand(time(0));
		const string file = "";
		if(!file.empty()) {
			freopen((file + ".in").c_str(), "r", stdin);
			freopen((file + ".out").c_str(), "w", stdout);
		}
	}
	#endif

	int n;
	scanf("%d", &n);
	for(int i = 0; i < n; i++) {
		scanf("%d%d", &x[i], &y[i]);
	}
	for(int i = 0; i < n; i++) {
		for(int f = i + 1; f < n; f++) {
			int vx = x[i] - x[f], vy = y[i] - y[f], dx, dy;
			if(vx < 0) {vx = -vx, vy = -vy;} else
			if(vx == 0 && vy < 0) {vx = -vx, vy = -vy;}
			if(vx == 0) {
				vy = 1;
				dx = x[i], dy = 0;
			} else
			if(vy == 0) {
				vx = 1;
				dx = 0, dy = y[i];
			} else {
				int c = __gcd(abs(x[i] - x[f]), abs(y[i] - y[f]));
				vx /= c;
				vy /= c;
				int cnt = x[i] / vx;
				dx = x[i] - cnt * vx;
				dy = y[i] - cnt * vy;
				if(x[i] < 0) {dx += vx; dy += vy;}
			}
			ma[mp(mp(vx, vy), mp(dx, dy))]++;
		}
	}
	map<pair<pair<int, int>, pair<int, int> >, int> :: iterator it;
	ll ans = 0;
	for(it = ma.begin(); it != ma.end(); it++) {
		int cnt = it -> sc;
		int c = ((1 + (int)sqrt(1 + 8 * cnt + eps)) >> 1);
		ans += cnt * 1ll * (n - c);
	}
	ans /= 3;
	printf("%I64d", ans);

	return(0);
}

// by Kim Andrey


#include <algorithm>
#include <iostream>
#include <sstream>
#include <utility>
#include <cstdlib>
#include <cstring>
#include <cassert>
#include <fstream>
#include <cstdio>
#include <string>
#include <vector>
#include <queue>
#include <cmath>
#include <ctime>
#include <stack>
#include <map>
#include <set>

using namespace std;

#define pb push_back
#define ppb pop_back
#define mp make_pair
#define fs first
#define sc second
#define abs(a) ((a) < 0 ? -(a) : (a))
#define sqr(a) ((a) * (a))

typedef unsigned int uint;
typedef long long ll;
typedef unsigned long long ull;

const double eps = 1e-9;
const int mod = (int)1e+9 + 7;
const double pi = acos(-1.);
const int maxn = 100100;

int x[maxn], y[maxn];
map<pair<pair<int, int>, pair<int, int> >, int> ma, ma2;

int main() {

	#ifdef SOL
	{
//		freopen("input.txt","r",stdin);
//		freopen("output.txt","w",stdout);
	}
	#else
	{
		srand(time(0));
		const string file = "";
		if(!file.empty()) {
			freopen((file + ".in").c_str(), "r", stdin);
			freopen((file + ".out").c_str(), "w", stdout);
		}
	}
	#endif

	int n;
	scanf("%d", &n);
	for(int i = 0; i < n; i++) {
		scanf("%d%d", &x[i], &y[i]);
	}
	for(int i = 0; i < n; i++) {
		for(int f = i + 1; f < n; f++) {
			int vx, vy;
			pair<int, int> d;
			if(abs(x[i] - x[f]) == 0) {
				vx = x[i] - x[f], vy = y[i] - y[f];
				vy = 1;
				d = mp(0, y[i]);
			} else
			if(abs(y[i] - y[f]) == 0) {
				vx = x[i] - x[f], vy = y[i] - y[f];
				vx = 1;
				d = mp(x[i], mod);
			} else {
				int c = __gcd(abs(x[i] - x[f]), abs(y[i] - y[f]));
				vx = (x[i] - x[f]) / c, vy = (y[i] - y[f]) / c;
				if(vx < 0) {vx = -vx; vy = -vy;}
				d = mp(x[i] % vx, y[i] - vy * (x[i] / vx));
				if(x[i] < 0 && x[i] % vx != 0) {x[i] += vx; y[i] += vy;}
			}
			ma[mp(mp(vx, vy), d)]++;
		}
	}

	ll ans = 0;
	for(int i = 0; i < n; i++) {
		for(int f = i + 1; f < n; f++) {
			int vx, vy;
			pair<int, int> d;
			if(abs(x[i] - x[f]) == 0) {
				vx = x[i] - x[f], vy = y[i] - y[f];
				vy = 1;
				d = mp(0, y[i]);
			} else
			if(abs(y[i] - y[f]) == 0) {
				vx = x[i] - x[f], vy = y[i] - y[f];
				vx = 1;
				d = mp(x[i], mod);
			} else {
				int c = __gcd(abs(x[i] - x[f]), abs(y[i] - y[f]));
				vx = (x[i] - x[f]) / c, vy = (y[i] - y[f]) / c;
				if(vx < 0) {vx = -vx; vy = -vy;}
				d = mp(x[i] % vx, y[i] - vy * (x[i] / vx));
				if(x[i] < 0 && x[i] % vx != 0) {x[i] += vx; y[i] += vy;}
			}
			ma[mp(mp(vx, vy), d)]--;
		}

		for(int f = i + 1; f < n; f++) {
			int vx, vy;
			pair<int, int> d;
			if(abs(x[i] - x[f]) == 0) {
				vx = x[i] - x[f], vy = y[i] - y[f];
				vy = 1;
				d = mp(0, y[i]);
			} else
			if(abs(y[i] - y[f]) == 0) {
				vx = x[i] - x[f], vy = y[i] - y[f];
				vx = 1;
				d = mp(x[i], mod);
			} else {
				int c = __gcd(abs(x[i] - x[f]), abs(y[i] - y[f]));
				vx = (x[i] - x[f]) / c, vy = (y[i] - y[f]) / c;
				if(vx < 0) {vx = -vx; vy = -vy;}
				d = mp(x[i] % vx, y[i] - vy * (x[i] / vx));
				if(x[i] < 0 && x[i] % vx != 0) {x[i] += vx; y[i] += vy;}
			}
			int c = ma[mp(mp(vx, vy), d)];
			int p = ++ma2[mp(mp(vx, vy), d)];
			int e = ((1 + (int)sqrt(1 + 8 * c + eps)) >> 1) - p;
			ans += n - f - 1 - e;
		}
		ma2.clear();
	}
	printf("%I64d", ans);

	return(0);
}

// by Kim Andrey


#include <algorithm>
#include <iostream>
#include <sstream>
#include <utility>
#include <cstdlib>
#include <cstring>
#include <cassert>
#include <fstream>
#include <cstdio>
#include <string>
#include <vector>
#include <queue>
#include <cmath>
#include <ctime>
#include <stack>
#include <map>
#include <set>

using namespace std;

#define pb push_back
#define ppb pop_back
#define mp make_pair
#define fs first
#define sc second
#define abs(a) ((a) < 0 ? -(a) : (a))
#define sqr(a) ((a) * (a))

typedef unsigned int uint;
typedef long long ll;
typedef unsigned long long ull;

const double eps = 1e-9;
const int mod = (int)1e+9 + 7;
const double pi = acos(-1.);
const int maxn = 100100;

int x[maxn], y[maxn];
map<pair<pair<int, int>, int>, int> ma, ma2;

int main() {

	#ifdef SOL
	{
//		freopen("input.txt","r",stdin);
//		freopen("output.txt","w",stdout);
	}
	#else
	{
		srand(time(0));
		const string file = "";
		if(!file.empty()) {
			freopen((file + ".in").c_str(), "r", stdin);
			freopen((file + ".out").c_str(), "w", stdout);
		}
	}
	#endif

	int n;
	scanf("%d", &n);
	for(int i = 0; i < n; i++) {
		scanf("%d%d", &x[i], &y[i]);
	}
	for(int i = 0; i < n; i++) {
		for(int f = i + 1; f < n; f++) {
			int vx, vy, d;
			if(abs(x[i] - x[f]) == 0) {
				vx = x[i] - x[f], vy = y[i] - y[f];
				if(vy < 0) {vy = -vy;}
				d = 0;
			} else
			if(abs(y[i] - y[f]) == 0) {
				vx = x[i] - x[f], vy = y[i] - y[f];
				if(vx < 0) {vx = -vx;}
				d = x[i];
			} else {
				int c = __gcd(abs(x[i] - x[f]), abs(y[i] - y[f]));
				vx = (x[i] - x[f]) / c, vy = (y[i] - y[f]) / c;
				if(vx < 0) {vx = -vx; vy = -vy;}
				d = x[i] % vx;
			}
			ma[mp(mp(vx, vy), d)]++;
		}
	}

	ll ans = 0;
	for(int i = 0; i < n; i++) {
		for(int f = i + 1; f < n; f++) {
			int vx, vy, d;
			if(abs(x[i] - x[f]) == 0) {
				vx = x[i] - x[f], vy = y[i] - y[f];
				if(vy < 0) {vy = -vy;}
				d = 0;
			} else
			if(abs(y[i] - y[f]) == 0) {
				vx = x[i] - x[f], vy = y[i] - y[f];
				if(vx < 0) {vx = -vx;}
				d = x[i];
			} else {
				int c = __gcd(abs(x[i] - x[f]), abs(y[i] - y[f]));
				vx = (x[i] - x[f]) / c, vy = (y[i] - y[f]) / c;
				if(vx < 0) {vx = -vx; vy = -vy;}
				d = x[i] % vx;
			}
			ma[mp(mp(vx, vy), d)]--;
		}

		for(int f = i + 1; f < n; f++) {
			int vx, vy, d;
			if(abs(x[i] - x[f]) == 0) {
				vx = x[i] - x[f], vy = y[i] - y[f];
				if(vy < 0) {vy = -vy;}
				d = 0;
			} else
			if(abs(y[i] - y[f]) == 0) {
				vx = x[i] - x[f], vy = y[i] - y[f];
				if(vx < 0) {vx = -vx;}
				d = x[i];
			} else {
				int c = __gcd(abs(x[i] - x[f]), abs(y[i] - y[f]));
				vx = (x[i] - x[f]) / c, vy = (y[i] - y[f]) / c;
				if(vx < 0) {vx = -vx; vy = -vy;}
				d = x[i] % vx;
			}
			int c = ma[mp(mp(vx, vy), d)];
			int p = ++ma2[mp(mp(vx, vy), d)];
			int e = ((1 + (int)sqrt(1 + 8 * c + eps)) >> 1) - p;
			ans += n - f - 1 - max(e, 0);
//			assert(e >= 0);
		}
		ma2.clear();
	}
	printf("%I64d", ans);

	return(0);
}

// by Kim Andrey


#include <algorithm>
#include <iostream>
#include <sstream>
#include <utility>
#include <cstdlib>
#include <cstring>
#include <cassert>
#include <fstream>
#include <cstdio>
#include <string>
#include <vector>
#include <queue>
#include <cmath>
#include <ctime>
#include <stack>
#include <map>
#include <set>

using namespace std;

#define pb push_back
#define ppb pop_back
#define mp make_pair
#define fs first
#define sc second
#define abs(a) ((a) < 0 ? -(a) : (a))
#define sqr(a) ((a) * (a))

typedef unsigned int uint;
typedef long long ll;
typedef unsigned long long ull;

const double eps = 1e-9;
const int mod = (int)1e+9 + 7;
const double pi = acos(-1.);
const int maxn = 100100;

int x[maxn], y[maxn];
map<pair<pair<int, int>, pair<int, int> >, int> ma, ma2;

int main() {

	#ifdef SOL
	{
//		freopen("input.txt","r",stdin);
//		freopen("output.txt","w",stdout);
	}
	#else
	{
		srand(time(0));
		const string file = "";
		if(!file.empty()) {
			freopen((file + ".in").c_str(), "r", stdin);
			freopen((file + ".out").c_str(), "w", stdout);
		}
	}
	#endif

	int n;
	scanf("%d", &n);
	for(int i = 0; i < n; i++) {
		scanf("%d%d", &x[i], &y[i]);
	}
	for(int i = 0; i < n; i++) {
		for(int f = i + 1; f < n; f++) {
			int vx, vy;
			pair<int, int> d;
			if(abs(x[i] - x[f]) == 0) {
				vx = x[i] - x[f], vy = y[i] - y[f];
				if(vy < 0) {vy = -vy;}
				d = mp(0, y[i]);
			} else
			if(abs(y[i] - y[f]) == 0) {
				vx = x[i] - x[f], vy = y[i] - y[f];
				if(vx < 0) {vx = -vx;}
				d = mp(x[i], mod);
			} else {
				int c = __gcd(abs(x[i] - x[f]), abs(y[i] - y[f]));
				vx = (x[i] - x[f]) / c, vy = (y[i] - y[f]) / c;
				if(vx < 0) {vx = -vx; vy = -vy;}
				d = mp(x[i] % vx, y[i] - vy * (x[i] / vx));
				if(x[i] < 0 && x[i] % vx != 0) {x[i] += vx; y[i] += vy;}
			}
			ma[mp(mp(vx, vy), d)]++;
		}
	}

	ll ans = 0;
	for(int i = 0; i < n; i++) {
		for(int f = i + 1; f < n; f++) {
			int vx, vy;
			pair<int, int> d;
			if(abs(x[i] - x[f]) == 0) {
				vx = x[i] - x[f], vy = y[i] - y[f];
				if(vy < 0) {vy = -vy;}
				d = mp(0, y[i]);
			} else
			if(abs(y[i] - y[f]) == 0) {
				vx = x[i] - x[f], vy = y[i] - y[f];
				if(vx < 0) {vx = -vx;}
				d = mp(x[i], mod);
			} else {
				int c = __gcd(abs(x[i] - x[f]), abs(y[i] - y[f]));
				vx = (x[i] - x[f]) / c, vy = (y[i] - y[f]) / c;
				if(vx < 0) {vx = -vx; vy = -vy;}
				d = mp(x[i] % vx, y[i] - vy * (x[i] / vx));
				if(x[i] < 0 && x[i] % vx != 0) {x[i] += vx; y[i] += vy;}
			}
			ma[mp(mp(vx, vy), d)]--;
		}

		for(int f = i + 1; f < n; f++) {
			int vx, vy;
			pair<int, int> d;
			if(abs(x[i] - x[f]) == 0) {
				vx = x[i] - x[f], vy = y[i] - y[f];
				if(vy < 0) {vy = -vy;}
				d = mp(0, y[i]);
			} else
			if(abs(y[i] - y[f]) == 0) {
				vx = x[i] - x[f], vy = y[i] - y[f];
				if(vx < 0) {vx = -vx;}
				d = mp(x[i], mod);
			} else {
				int c = __gcd(abs(x[i] - x[f]), abs(y[i] - y[f]));
				vx = (x[i] - x[f]) / c, vy = (y[i] - y[f]) / c;
				if(vx < 0) {vx = -vx; vy = -vy;}
				d = mp(x[i] % vx, y[i] - vy * (x[i] / vx));
				if(x[i] < 0 && x[i] % vx != 0) {x[i] += vx; y[i] += vy;}
			}
			int c = ma[mp(mp(vx, vy), d)];
			int p = ++ma2[mp(mp(vx, vy), d)];
			int e = ((1 + (int)sqrt(1 + 8 * c + eps)) >> 1) - p;
			ans += n - f - 1 - e;
		}
		ma2.clear();
	}
	printf("%I64d", ans);

	return(0);
}

// by Kim Andrey


#include <algorithm>
#include <iostream>
#include <sstream>
#include <utility>
#include <cstdlib>
#include <cstring>
#include <cassert>
#include <fstream>
#include <cstdio>
#include <string>
#include <vector>
#include <queue>
#include <cmath>
#include <ctime>
#include <stack>
#include <map>
#include <set>

using namespace std;

#define pb push_back
#define ppb pop_back
#define mp make_pair
#define fs first
#define sc second
#define abs(a) ((a) < 0 ? -(a) : (a))
#define sqr(a) ((a) * (a))

typedef unsigned int uint;
typedef long long ll;
typedef unsigned long long ull;

const double eps = 1e-9;
const int mod = (int)1e+9 + 7;
const double pi = acos(-1.);
const int maxn = 100100;

int x[maxn], y[maxn];
map<pair<pair<int, int>, int>, int> ma, ma2;

int main() {

	#ifdef SOL
	{
//		freopen("input.txt","r",stdin);
//		freopen("output.txt","w",stdout);
	}
	#else
	{
		srand(time(0));
		const string file = "";
		if(!file.empty()) {
			freopen((file + ".in").c_str(), "r", stdin);
			freopen((file + ".out").c_str(), "w", stdout);
		}
	}
	#endif

	int n;
	scanf("%d", &n);
	for(int i = 0; i < n; i++) {
		scanf("%d%d", &x[i], &y[i]);
	}
	for(int i = 0; i < n; i++) {
		for(int f = i + 1; f < n; f++) {
			int vx, vy, d;
			if(abs(x[i] - x[f]) == 0) {
				vx = x[i] - x[f], vy = y[i] - y[f];
				if(vy < 0) {vy = -vy;}
				d = 0;
			} else
			if(abs(y[i] - y[f]) == 0) {
				vx = x[i] - x[f], vy = y[i] - y[f];
				if(vx < 0) {vx = -vx;}
				d = x[i];
			} else {
				int c = __gcd(abs(x[i] - x[f]), abs(y[i] - y[f]));
				vx = (x[i] - x[f]) / c, vy = (y[i] - y[f]) / c;
				if(vx < 0) {vx = -vx; vy = -vy;}
				d = x[i] % vx;
			}
			ma[mp(mp(vx, vy), d)]++;
		}
	}

	ll ans = 0;
	for(int i = 0; i < n; i++) {
		for(int f = i + 1; f < n; f++) {
			int vx, vy, d;
			if(abs(x[i] - x[f]) == 0) {
				vx = x[i] - x[f], vy = y[i] - y[f];
				if(vy < 0) {vy = -vy;}
				d = 0;
			} else
			if(abs(y[i] - y[f]) == 0) {
				vx = x[i] - x[f], vy = y[i] - y[f];
				if(vx < 0) {vx = -vx;}
				d = x[i];
			} else {
				int c = __gcd(abs(x[i] - x[f]), abs(y[i] - y[f]));
				vx = (x[i] - x[f]) / c, vy = (y[i] - y[f]) / c;
				if(vx < 0) {vx = -vx; vy = -vy;}
				d = x[i] % vx;
			}
			ma[mp(mp(vx, vy), d)]--;
		}

		for(int f = i + 1; f < n; f++) {
			int vx, vy, d;
			if(abs(x[i] - x[f]) == 0) {
				vx = x[i] - x[f], vy = y[i] - y[f];
				if(vy < 0) {vy = -vy;}
				d = 0;
			} else
			if(abs(y[i] - y[f]) == 0) {
				vx = x[i] - x[f], vy = y[i] - y[f];
				if(vx < 0) {vx = -vx;}
				d = x[i];
			} else {
				int c = __gcd(abs(x[i] - x[f]), abs(y[i] - y[f]));
				vx = (x[i] - x[f]) / c, vy = (y[i] - y[f]) / c;
				if(vx < 0) {vx = -vx; vy = -vy;}
				d = x[i] % vx;
			}
			int c = ma[mp(mp(vx, vy), d)];
			int p = ++ma2[mp(mp(vx, vy), d)];
			int e = ((1 + (int)sqrt(1 + 8 * c + eps)) >> 1) - p;
			ans += n - f - 1 - e;
			assert(e >= 0);
		}
		ma2.clear();
	}
	printf("%I64d", ans);

	return(0);
}

// by Kim Andrey


#include <algorithm>
#include <iostream>
#include <sstream>
#include <utility>
#include <cstdlib>
#include <cstring>
#include <cassert>
#include <fstream>
#include <cstdio>
#include <string>
#include <vector>
#include <queue>
#include <cmath>
#include <ctime>
#include <stack>
#include <map>
#include <set>

using namespace std;

#define pb push_back
#define ppb pop_back
#define mp make_pair
#define fs first
#define sc second
#define abs(a) ((a) < 0 ? -(a) : (a))
#define sqr(a) ((a) * (a))

typedef unsigned int uint;
typedef long long ll;
typedef unsigned long long ull;

const double eps = 1e-9;
const int mod = (int)1e+9 + 7;
const double pi = acos(-1.);
const int maxn = 100100;

int x[maxn], y[maxn];
map<pair<pair<int, int>, pair<int, int> >, int> ma, ma2;

int main() {

	#ifdef SOL
	{
//		freopen("input.txt","r",stdin);
//		freopen("output.txt","w",stdout);
	}
	#else
	{
		srand(time(0));
		const string file = "";
		if(!file.empty()) {
			freopen((file + ".in").c_str(), "r", stdin);
			freopen((file + ".out").c_str(), "w", stdout);
		}
	}
	#endif

	int n;
	scanf("%d", &n);
	for(int i = 0; i < n; i++) {
		scanf("%d%d", &x[i], &y[i]);
	}
	for(int i = 0; i < n; i++) {
		for(int f = i + 1; f < n; f++) {
			int vx, vy;
			pair<int, int> d;
			if(abs(x[i] - x[f]) == 0) {
				vx = x[i] - x[f], vy = y[i] - y[f];
				if(vy < 0) {vy = -vy;}
				d = mp(0, y[i]);
			} else
			if(abs(y[i] - y[f]) == 0) {
				vx = x[i] - x[f], vy = y[i] - y[f];
				if(vx < 0) {vx = -vx;}
				d = mp(x[i], mod);
			} else {
				int c = __gcd(abs(x[i] - x[f]), abs(y[i] - y[f]));
				vx = (x[i] - x[f]) / c, vy = (y[i] - y[f]) / c;
				if(vx < 0) {vx = -vx; vy = -vy;}
				d = mp(x[i] % vx, y[i] - vy * x[i] / vx);
			}
			ma[mp(mp(vx, vy), d)]++;
		}
	}

	ll ans = 0;
	for(int i = 0; i < n; i++) {
		for(int f = i + 1; f < n; f++) {
			int vx, vy;
			pair<int, int> d;
			if(abs(x[i] - x[f]) == 0) {
				vx = x[i] - x[f], vy = y[i] - y[f];
				if(vy < 0) {vy = -vy;}
				d = mp(0, y[i]);
			} else
			if(abs(y[i] - y[f]) == 0) {
				vx = x[i] - x[f], vy = y[i] - y[f];
				if(vx < 0) {vx = -vx;}
				d = mp(x[i], mod);
			} else {
				int c = __gcd(abs(x[i] - x[f]), abs(y[i] - y[f]));
				vx = (x[i] - x[f]) / c, vy = (y[i] - y[f]) / c;
				if(vx < 0) {vx = -vx; vy = -vy;}
				d = mp(x[i] % vx, y[i] - vy * x[i] / vx);
			}
			ma[mp(mp(vx, vy), d)]--;
		}

		for(int f = i + 1; f < n; f++) {
			int vx, vy;
			pair<int, int> d;
			if(abs(x[i] - x[f]) == 0) {
				vx = x[i] - x[f], vy = y[i] - y[f];
				if(vy < 0) {vy = -vy;}
				d = mp(0, y[i]);
			} else
			if(abs(y[i] - y[f]) == 0) {
				vx = x[i] - x[f], vy = y[i] - y[f];
				if(vx < 0) {vx = -vx;}
				d = mp(x[i], mod);
			} else {
				int c = __gcd(abs(x[i] - x[f]), abs(y[i] - y[f]));
				vx = (x[i] - x[f]) / c, vy = (y[i] - y[f]) / c;
				if(vx < 0) {vx = -vx; vy = -vy;}
				d = mp(x[i] % vx, y[i] - vy * x[i] / vx);
			}
			int c = ma[mp(mp(vx, vy), d)];
			int p = ++ma2[mp(mp(vx, vy), d)];
			int e = ((1 + (int)sqrt(1 + 8 * c + eps)) >> 1) - p;
			ans += n - f - 1 - e;
		}
		ma2.clear();
	}
	printf("%I64d", ans);

	return(0);
}

// by Kim Andrey


#include <algorithm>
#include <iostream>
#include <sstream>
#include <utility>
#include <cstdlib>
#include <cstring>
#include <cassert>
#include <fstream>
#include <cstdio>
#include <string>
#include <vector>
#include <queue>
#include <cmath>
#include <ctime>
#include <stack>
#include <map>
#include <set>

using namespace std;

#define pb push_back
#define ppb pop_back
#define mp make_pair
#define fs first
#define sc second
#define abs(a) ((a) < 0 ? -(a) : (a))
#define sqr(a) ((a) * (a))

typedef unsigned int uint;
typedef long long ll;
typedef unsigned long long ull;

const double eps = 1e-9;
const int mod = (int)1e+9 + 7;
const double pi = acos(-1.);
const int maxn = 100100;

int x[maxn], y[maxn];
map<pair<pair<int, int>, pair<int, int> >, int> ma;

int main() {

	#ifdef SOL
	{
//		freopen("input.txt","r",stdin);
//		freopen("output.txt","w",stdout);
	}
	#else
	{
		srand(time(0));
		const string file = "";
		if(!file.empty()) {
			freopen((file + ".in").c_str(), "r", stdin);
			freopen((file + ".out").c_str(), "w", stdout);
		}
	}
	#endif

	int n;
	scanf("%d", &n);
	for(int i = 0; i < n; i++) {
		scanf("%d%d", &x[i], &y[i]);
	}
	for(int i = 0; i < n; i++) {
		for(int f = i + 1; f < n; f++) {
			int vx = x[i] - x[f], vy = y[i] - y[f], dx, dy;
			if(vx < 0) {vx = -vx, vy = -vy;} else
			if(vx == 0 && vy < 0) {vx = -vx, vy = -vy;}
			if(vx == 0) {
				vy = 1;
				dx = x[i], dy = 0;
			} else
			if(vy == 0) {
				vx = 1;
				dx = 0, dy = y[i];
			} else {
				int c = __gcd(abs(x[i] - x[f]), abs(y[i] - y[f]));
				vx /= c;
				vy /= c;
				int cnt = x[i] / vx;
				dx = x[i] - cnt * vx;
				dy = y[i] - cnt * vy;
			}
			ma[mp(mp(vx, vy), mp(dx, dy))]++;
		}
	}
	map<pair<pair<int, int>, pair<int, int> >, int> :: iterator it;
	ll ans = 0;
	for(it = ma.begin(); it != ma.end(); it++) {
		int cnt = it -> sc;
		int c = ((1 + (int)sqrt(1 + 8 * cnt + eps)) >> 1);
		ans += cnt * 1ll * (n - c);
	}
	ans /= 3;
	printf("%I64d", ans);

	return(0);
}

// by Kim Andrey


#include <algorithm>
#include <iostream>
#include <sstream>
#include <utility>
#include <cstdlib>
#include <cstring>
#include <cassert>
#include <fstream>
#include <cstdio>
#include <string>
#include <vector>
#include <queue>
#include <cmath>
#include <ctime>
#include <stack>
#include <map>
#include <set>

using namespace std;

#define pb push_back
#define ppb pop_back
#define mp make_pair
#define fs first
#define sc second
#define abs(a) ((a) < 0 ? -(a) : (a))
#define sqr(a) ((a) * (a))

typedef unsigned int uint;
typedef long long ll;
typedef unsigned long long ull;

const double eps = 1e-9;
const int mod = (int)1e+9 + 7;
const double pi = acos(-1.);
const int maxn = 100100;

int x[maxn], y[maxn];
map<pair<pair<int, int>, pair<int, int> >, int> ma;

int main() {

	#ifdef SOL
	{
//		freopen("input.txt","r",stdin);
//		freopen("output.txt","w",stdout);
	}
	#else
	{
		srand(time(0));
		const string file = "";
		if(!file.empty()) {
			freopen((file + ".in").c_str(), "r", stdin);
			freopen((file + ".out").c_str(), "w", stdout);
		}
	}
	#endif

	int n;
	scanf("%d", &n);
	for(int i = 0; i < n; i++) {
		scanf("%d%d", &x[i], &y[i]);
	}
	for(int i = 0; i < n; i++) {
		for(int f = i + 1; f < n; f++) {
			int vx = x[i] - x[f], vy = y[i] - y[f], dx, dy;
			if(vx < 0) {vx = -vx, vy = -vy;} else
			if(vx == 0 && vy < 0) {vx = -vx, vy = -vy;}
			if(vx == 0) {
				vy = 1;
				dx = x[i], dy = 0;
			} else
			if(vy == 0) {
				vx = 1;
				dx = 0, dy = y[i];
			} else {
				int c = __gcd(abs(x[i] - x[f]), abs(y[i] - y[f]));
				vx /= c;
				vy /= c;
				int cnt = x[i] / vx;
				dx = x[i] - cnt * vx;
				dy = y[i] - cnt * vy;
				if(x[i] < 0 && dx < 0) {dx += vx; dy += vy;}
			}
			ma[mp(mp(vx, vy), mp(dx, dy))]++;
		}
	}
	map<pair<pair<int, int>, pair<int, int> >, int> :: iterator it;
	ll ans = 0;
	for(it = ma.begin(); it != ma.end(); it++) {
		int cnt = it -> sc;
		int c = ((1 + (int)sqrt(1 + 8 * cnt + eps)) >> 1);
		ans += cnt * 1ll * (n - c);
	}
	ans /= 3;
	printf("%I64d", ans);

	return(0);
}

// by Kim Andrey


#include <algorithm>
#include <iostream>
#include <sstream>
#include <utility>
#include <cstdlib>
#include <cstring>
#include <cassert>
#include <fstream>
#include <cstdio>
#include <string>
#include <vector>
#include <queue>
#include <cmath>
#include <ctime>
#include <stack>
#include <map>
#include <set>

using namespace std;

#define pb push_back
#define ppb pop_back
#define mp make_pair
#define fs first
#define sc second
#define abs(a) ((a) < 0 ? -(a) : (a))
#define sqr(a) ((a) * (a))

typedef unsigned int uint;
typedef long long ll;
typedef unsigned long long ull;

const double eps = 1e-9;
const int mod = (int)1e+9 + 7;
const double pi = acos(-1.);
const int maxn = 100100;

int x[maxn], y[maxn];
map<pair<pair<int, int>, pair<int, int> >, int> ma;

int main() {

	#ifdef SOL
	{
//		freopen("input.txt","r",stdin);
//		freopen("output.txt","w",stdout);
	}
	#else
	{
		srand(time(0));
		const string file = "";
		if(!file.empty()) {
			freopen((file + ".in").c_str(), "r", stdin);
			freopen((file + ".out").c_str(), "w", stdout);
		}
	}
	#endif

	int n;
	scanf("%d", &n);
	for(int i = 0; i < n; i++) {
		scanf("%d%d", &x[i], &y[i]);
	}
	for(int i = 0; i < n; i++) {
		for(int f = i + 1; f < n; f++) {
			int vx = x[i] - x[f], vy = y[i] - y[f], dx, dy;
			if(vx < 0) {vx = -vx, vy = -vy;} else
			if(vx == 0 && vy < 0) {vx = -vx, vy = -vy;}
			if(vx == 0) {
				vy = 1;
				dx = x[i], dy = 0;
			} else
			if(vy == 0) {
				vx = 1;
				dx = 0, dy = y[i];
			} else {
				int c = __gcd(abs(x[i] - x[f]), abs(y[i] - y[f]));
				vx /= c;
				vy /= c;
				int cnt = x[i] / vx;
				dx = x[i] - cnt * vx;
				dy = y[i] - cnt * vy;
			}
			ma[mp(mp(vx, vy), mp(dx, dy))]++;
//			cout << vx << " " << vy << " " << dx << " " << dy << endl;
		}
	}
	map<pair<pair<int, int>, pair<int, int> >, int> :: iterator it;
	ll ans = 0;
	for(it = ma.begin(); it != ma.end(); it++) {
		int cnt = it -> sc;
		int c = ((1 + (int)sqrt(1 + 8 * cnt)) >> 1);
		ans += cnt * 1ll * (n - c);
	}
	ans /= 3;
	printf("%I64d", ans);

	return(0);
}

// by Kim Andrey


#include <algorithm>
#include <iostream>
#include <sstream>
#include <utility>
#include <cstdlib>
#include <cstring>
#include <cassert>
#include <fstream>
#include <cstdio>
#include <string>
#include <vector>
#include <queue>
#include <cmath>
#include <ctime>
#include <stack>
#include <map>
#include <set>

using namespace std;

#define pb push_back
#define ppb pop_back
#define mp make_pair
#define fs first
#define sc second
#define abs(a) ((a) < 0 ? -(a) : (a))
#define sqr(a) ((a) * (a))

typedef unsigned int uint;
typedef long long ll;
typedef unsigned long long ull;

const double eps = 1e-9;
const int mod = (int)1e+9 + 7;
const double pi = acos(-1.);
const int maxn = 100100;

int x[maxn], y[maxn];
map<pair<pair<int, int>, int>, int> ma;

int main() {

	#ifdef SOL
	{
//		freopen("input.txt","r",stdin);
//		freopen("output.txt","w",stdout);
	}
	#else
	{
		srand(time(0));
		const string file = "";
		if(!file.empty()) {
			freopen((file + ".in").c_str(), "r", stdin);
			freopen((file + ".out").c_str(), "w", stdout);
		}
	}
	#endif

	int n;
	scanf("%d", &n);
	for(int i = 0; i < n; i++) {
		scanf("%d%d", &x[i], &y[i]);
	}
	for(int i = 0; i < n; i++) {
		for(int f = 0; f < i; f++) {
			int vx, vy, d;
			if(abs(x[i] - x[f]) == 0) {
				vx = x[i] - x[f], vy = y[i] - y[f];
				if(vy < 0) {vy = -vy;}
				d = 0;
			} else
			if(abs(y[i] - y[f]) == 0) {
				vx = x[i] - x[f], vy = y[i] - y[f];
				if(vx < 0) {vx = -vx;}
				d = x[i];
			} else {
				int c = __gcd(abs(x[i] - x[f]), abs(y[i] - y[f]));
				vx = (x[i] - x[f]) / c, vy = (y[i] - y[f]) / c;
				if(vx < 0) {vx = -vx; vy = -vy;}
				d = x[i] % vx;
			}
			ma[mp(mp(vx, vy), d)]++;
		}
	}
	ll ans = 0;
	for(int i = 0; i < n; i++) {
		for(int f = 0; f < i; f++) {
			int vx, vy, d;
			if(abs(x[i] - x[f]) == 0) {
				vx = x[i] - x[f], vy = y[i] - y[f];
				d = 0;
			} else
			if(abs(y[i] - y[f]) == 0) {
				vx = x[i] - x[f], vy = y[i] - y[f];
				d = x[i];
			} else {
				int c = __gcd(abs(x[i] - x[f]), abs(y[i] - y[f]));
				vx = (x[i] - x[f]) / c, vy = (y[i] - y[f]) / c;
				d = x[i] % vx;
			}
			int c = ma[mp(mp(vx, vy), d)];
			int e = ((1 + (int)sqrt(1 + 8 * c + eps)) >> 1) - 2;
			ans += n - i - 1 - e;
			ma[mp(mp(vx, vy), d)]--;
		}
	}
	printf("%I64d", ans);

	return(0);
}

// by Kim Andrey


#include <algorithm>
#include <iostream>
#include <sstream>
#include <utility>
#include <cstdlib>
#include <cstring>
#include <cassert>
#include <fstream>
#include <cstdio>
#include <string>
#include <vector>
#include <queue>
#include <cmath>
#include <ctime>
#include <stack>
#include <map>
#include <set>

using namespace std;

#define pb push_back
#define ppb pop_back
#define mp make_pair
#define fs first
#define sc second
#define abs(a) ((a) < 0 ? -(a) : (a))
#define sqr(a) ((a) * (a))

typedef unsigned int uint;
typedef long long ll;
typedef unsigned long long ull;

const double eps = 1e-9;
const int mod = (int)1e+9 + 7;
const double pi = acos(-1.);
const int maxn = 100100;

int x[maxn], y[maxn];
map<pair<pair<int, int>, int>, int> ma, ma2;

int main() {

	#ifdef SOL
	{
//		freopen("input.txt","r",stdin);
//		freopen("output.txt","w",stdout);
	}
	#else
	{
		srand(time(0));
		const string file = "";
		if(!file.empty()) {
			freopen((file + ".in").c_str(), "r", stdin);
			freopen((file + ".out").c_str(), "w", stdout);
		}
	}
	#endif

	int n;
	scanf("%d", &n);
	for(int i = 0; i < n; i++) {
		scanf("%d%d", &x[i], &y[i]);
	}
	for(int i = 0; i < n; i++) {
		for(int f = i + 1; f < n; f++) {
			int vx, vy, d;
			if(abs(x[i] - x[f]) == 0) {
				vx = x[i] - x[f], vy = y[i] - y[f];
				if(vy < 0) {vy = -vy;}
				d = 0;
			} else
			if(abs(y[i] - y[f]) == 0) {
				vx = x[i] - x[f], vy = y[i] - y[f];
				if(vx < 0) {vx = -vx;}
				d = x[i];
			} else {
				int c = __gcd(abs(x[i] - x[f]), abs(y[i] - y[f]));
				vx = (x[i] - x[f]) / c, vy = (y[i] - y[f]) / c;
				if(vx < 0) {vx = -vx; vy = -vy;}
				d = x[i] % vx;
			}
			ma[mp(mp(vx, vy), d)]++;
		}
	}

	ll ans = 0;
	for(int i = 0; i < n; i++) {
		for(int f = i + 1; f < n; f++) {
			int vx, vy, d;
			if(abs(x[i] - x[f]) == 0) {
				vx = x[i] - x[f], vy = y[i] - y[f];
				if(vy < 0) {vy = -vy;}
				d = 0;
			} else
			if(abs(y[i] - y[f]) == 0) {
				vx = x[i] - x[f], vy = y[i] - y[f];
				if(vx < 0) {vx = -vx;}
				d = x[i];
			} else {
				int c = __gcd(abs(x[i] - x[f]), abs(y[i] - y[f]));
				vx = (x[i] - x[f]) / c, vy = (y[i] - y[f]) / c;
				if(vx < 0) {vx = -vx; vy = -vy;}
				d = x[i] % vx;
			}
			ma[mp(mp(vx, vy), d)]--;
		}

		for(int f = i + 1; f < n; f++) {
			int vx, vy, d;
			if(abs(x[i] - x[f]) == 0) {
				vx = x[i] - x[f], vy = y[i] - y[f];
				if(vy < 0) {vy = -vy;}
				d = 0;
			} else
			if(abs(y[i] - y[f]) == 0) {
				vx = x[i] - x[f], vy = y[i] - y[f];
				if(vx < 0) {vx = -vx;}
				d = x[i];
			} else {
				int c = __gcd(abs(x[i] - x[f]), abs(y[i] - y[f]));
				vx = (x[i] - x[f]) / c, vy = (y[i] - y[f]) / c;
				if(vx < 0) {vx = -vx; vy = -vy;}
				d = x[i] % vx;
			}
			int c = ma[mp(mp(vx, vy), d)];
			int p = ++ma2[mp(mp(vx, vy), d)];
			int e = ((1 + (int)sqrt(1 + 8 * c + eps)) >> 1) - p;
			ans += n - f - 1 - e;
			assert(n - f - 1 - e >= 0);
		}
		ma2.clear();
	}
	printf("%I64d", ans);

	return(0);
}

// by Kim Andrey


#include <algorithm>
#include <iostream>
#include <sstream>
#include <utility>
#include <cstdlib>
#include <cstring>
#include <cassert>
#include <fstream>
#include <cstdio>
#include <string>
#include <vector>
#include <queue>
#include <cmath>
#include <ctime>
#include <stack>
#include <map>
#include <set>

using namespace std;

#define pb push_back
#define ppb pop_back
#define mp make_pair
#define fs first
#define sc second
#define abs(a) ((a) < 0 ? -(a) : (a))
#define sqr(a) ((a) * (a))

typedef unsigned int uint;
typedef long long ll;
typedef unsigned long long ull;

const double eps = 1e-9;
const int mod = (int)1e+9 + 7;
const double pi = acos(-1.);
const int maxn = 100100;

int x[maxn], y[maxn];
map<pair<pair<int, int>, int>, int> ma;

int main() {

	#ifdef SOL
	{
//		freopen("input.txt","r",stdin);
//		freopen("output.txt","w",stdout);
	}
	#else
	{
		srand(time(0));
		const string file = "";
		if(!file.empty()) {
			freopen((file + ".in").c_str(), "r", stdin);
			freopen((file + ".out").c_str(), "w", stdout);
		}
	}
	#endif

	int n;
	scanf("%d", &n);
	for(int i = 0; i < n; i++) {
		scanf("%d%d", &x[i], &y[i]);
	}
	for(int i = 0; i < n; i++) {
		for(int f = 0; f < i; f++) {
			int vx, vy, d;
			if(abs(x[i] - x[f]) == 0) {
				vx = x[i] - x[f], vy = y[i] - y[f];
				if(vy < 0) {vy = -vy;}
				d = 0;
			} else
			if(abs(y[i] - y[f]) == 0) {
				vx = x[i] - x[f], vy = y[i] - y[f];
				if(vx < 0) {vx = -vx;}
				d = x[i];
			} else {
				int c = __gcd(abs(x[i] - x[f]), abs(y[i] - y[f]));
				vx = (x[i] - x[f]) / c, vy = (y[i] - y[f]) / c;
				if(vx < 0) {vx = -vx; vy = -vy;}
				d = x[i] % vx;
			}
			ma[mp(mp(vx, vy), d)]++;
		}
	}
	ll ans = 0;
	for(int i = 0; i < n; i++) {
		for(int f = 0; f < i; f++) {
			int vx, vy, d;
			if(abs(x[i] - x[f]) == 0) {
				vx = x[i] - x[f], vy = y[i] - y[f];
				d = 0;
			} else
			if(abs(y[i] - y[f]) == 0) {
				vx = x[i] - x[f], vy = y[i] - y[f];
				d = x[i];
			} else {
				int c = __gcd(abs(x[i] - x[f]), abs(y[i] - y[f]));
				vx = (x[i] - x[f]) / c, vy = (y[i] - y[f]) / c;
				d = x[i] % vx;
			}
			int c = ma[mp(mp(vx, vy), d)];
//			cout << i << " " << f << " " << c << " ";
			int e = ((1 + (int)sqrt(1 + 8 * c)) >> 1) - 2;
			ans += n - i - 1 - e;
			ma[mp(mp(vx, vy), d)]--;
//			cout << vx << " " << vy << " " << d << " " << e << " " << ans << endl;
		}
	}
	printf("%I64d", ans);

	return(0);
}

// by Kim Andrey


#include <algorithm>
#include <iostream>
#include <sstream>
#include <utility>
#include <cstdlib>
#include <cstring>
#include <cassert>
#include <fstream>
#include <cstdio>
#include <string>
#include <vector>
#include <queue>
#include <cmath>
#include <ctime>
#include <stack>
#include <map>
#include <set>

using namespace std;

#define pb push_back
#define ppb pop_back
#define mp make_pair
#define fs first
#define sc second
#define abs(a) ((a) < 0 ? -(a) : (a))
#define sqr(a) ((a) * (a))

typedef unsigned int uint;
typedef long long ll;
typedef unsigned long long ull;

const double eps = 1e-9;
const int mod = (int)1e+9 + 7;
const double pi = acos(-1.);
const int maxn = 100100;

int x[maxn], y[maxn];
map<pair<pair<int, int>, int>, int> ma, ma2;

int main() {

	#ifdef SOL
	{
//		freopen("input.txt","r",stdin);
//		freopen("output.txt","w",stdout);
	}
	#else
	{
		srand(time(0));
		const string file = "";
		if(!file.empty()) {
			freopen((file + ".in").c_str(), "r", stdin);
			freopen((file + ".out").c_str(), "w", stdout);
		}
	}
	#endif

	int n;
	scanf("%d", &n);
	for(int i = 0; i < n; i++) {
		scanf("%d%d", &x[i], &y[i]);
	}
	for(int i = 0; i < n; i++) {
		for(int f = i + 1; f < n; f++) {
			int vx, vy, d;
			if(abs(x[i] - x[f]) == 0) {
				vx = x[i] - x[f], vy = y[i] - y[f];
				if(vy < 0) {vy = -vy;}
				d = 0;
			} else
			if(abs(y[i] - y[f]) == 0) {
				vx = x[i] - x[f], vy = y[i] - y[f];
				if(vx < 0) {vx = -vx;}
				d = x[i];
			} else {
				int c = __gcd(abs(x[i] - x[f]), abs(y[i] - y[f]));
				vx = (x[i] - x[f]) / c, vy = (y[i] - y[f]) / c;
				if(vx < 0) {vx = -vx; vy = -vy;}
				d = x[i] % vx;
			}
			ma[mp(mp(vx, vy), d)]++;
		}
	}
	ll ans = 0;
	for(int i = 0; i < n; i++) {
		for(int f = i + 1; f < n; f++) {
			int vx, vy, d;
			if(abs(x[i] - x[f]) == 0) {
				vx = x[i] - x[f], vy = y[i] - y[f];
				if(vy < 0) {vy = -vy;}
				d = 0;
			} else
			if(abs(y[i] - y[f]) == 0) {
				vx = x[i] - x[f], vy = y[i] - y[f];
				if(vx < 0) {vx = -vx;}
				d = x[i];
			} else {
				int c = __gcd(abs(x[i] - x[f]), abs(y[i] - y[f]));
				vx = (x[i] - x[f]) / c, vy = (y[i] - y[f]) / c;
				if(vx < 0) {vx = -vx; vy = -vy;}
				d = x[i] % vx;
			}
			ma[mp(mp(vx, vy), d)]--;
		}
		for(int f = i + 1; f < n; f++) {
			int vx, vy, d;
			if(abs(x[i] - x[f]) == 0) {
				vx = x[i] - x[f], vy = y[i] - y[f];
				if(vy < 0) {vy = -vy;}
				d = 0;
			} else
			if(abs(y[i] - y[f]) == 0) {
				vx = x[i] - x[f], vy = y[i] - y[f];
				if(vx < 0) {vx = -vx;}
				d = x[i];
			} else {
				int c = __gcd(abs(x[i] - x[f]), abs(y[i] - y[f]));
				vx = (x[i] - x[f]) / c, vy = (y[i] - y[f]) / c;
				if(vx < 0) {vx = -vx; vy = -vy;}
				d = x[i] % vx;
			}
			int c = ma[mp(mp(vx, vy), d)];
			int p = ++ma2[mp(mp(vx, vy), d)];
			int e = ((1 + (int)sqrt(1 + 8 * c + eps)) >> 1) - p;
			ans += n - f - 1 - e;
//			cout << i << " " << f << " " << e  << " " << ans << " " << endl;
//			cout << vx << " " << vy << " " << d << " " << endl;
//			ma[mp(mp(vx, vy), d)]--;
		}
		ma2.clear();
	}
	printf("%I64d", ans);

	return(0);
}

// by Kim Andrey


#include <algorithm>
#include <iostream>
#include <sstream>
#include <utility>
#include <cstdlib>
#include <cstring>
#include <cassert>
#include <fstream>
#include <cstdio>
#include <string>
#include <vector>
#include <queue>
#include <cmath>
#include <ctime>
#include <stack>
#include <map>
#include <set>

using namespace std;

#define pb push_back
#define ppb pop_back
#define mp make_pair
#define fs first
#define sc second
#define abs(a) ((a) < 0 ? -(a) : (a))
#define sqr(a) ((a) * (a))

typedef unsigned int uint;
typedef long long ll;
typedef unsigned long long ull;

const double eps = 1e-9;
const int mod = (int)1e+9 + 7;
const double pi = acos(-1.);
const int maxn = 100100;

int x[maxn], y[maxn];
map<pair<pair<int, int>, pair<int, int> >, int> ma, ma2;

int main() {

	#ifdef SOL
	{
//		freopen("input.txt","r",stdin);
//		freopen("output.txt","w",stdout);
	}
	#else
	{
		srand(time(0));
		const string file = "";
		if(!file.empty()) {
			freopen((file + ".in").c_str(), "r", stdin);
			freopen((file + ".out").c_str(), "w", stdout);
		}
	}
	#endif

	int n;
	scanf("%d", &n);
	for(int i = 0; i < n; i++) {
		scanf("%d%d", &x[i], &y[i]);
	}
	for(int i = 0; i < n; i++) {
		for(int f = i + 1; f < n; f++) {
			int vx, vy;
			pair<int, int> d;
			if(abs(x[i] - x[f]) == 0) {
				vx = x[i] - x[f], vy = y[i] - y[f];
				if(vy < 0) {vy = -vy;}
				d = mp(0, y[i]);
			} else
			if(abs(y[i] - y[f]) == 0) {
				vx = x[i] - x[f], vy = y[i] - y[f];
				if(vx < 0) {vx = -vx;}
				d = mp(x[i], mod);
			} else {
				int c = __gcd(abs(x[i] - x[f]), abs(y[i] - y[f]));
				vx = (x[i] - x[f]) / c, vy = (y[i] - y[f]) / c;
				if(vx < 0) {vx = -vx; vy = -vy;}
				d = mp(x[i] % vx, y[i] - vy * (x[i] / vx));
			}
			ma[mp(mp(vx, vy), d)]++;
		}
	}

	ll ans = 0;
	for(int i = 0; i < n; i++) {
		for(int f = i + 1; f < n; f++) {
			int vx, vy;
			pair<int, int> d;
			if(abs(x[i] - x[f]) == 0) {
				vx = x[i] - x[f], vy = y[i] - y[f];
				if(vy < 0) {vy = -vy;}
				d = mp(0, y[i]);
			} else
			if(abs(y[i] - y[f]) == 0) {
				vx = x[i] - x[f], vy = y[i] - y[f];
				if(vx < 0) {vx = -vx;}
				d = mp(x[i], mod);
			} else {
				int c = __gcd(abs(x[i] - x[f]), abs(y[i] - y[f]));
				vx = (x[i] - x[f]) / c, vy = (y[i] - y[f]) / c;
				if(vx < 0) {vx = -vx; vy = -vy;}
				d = mp(x[i] % vx, y[i] - vy * (x[i] / vx));
			}
			ma[mp(mp(vx, vy), d)]--;
		}

		for(int f = i + 1; f < n; f++) {
			int vx, vy;
			pair<int, int> d;
			if(abs(x[i] - x[f]) == 0) {
				vx = x[i] - x[f], vy = y[i] - y[f];
				if(vy < 0) {vy = -vy;}
				d = mp(0, y[i]);
			} else
			if(abs(y[i] - y[f]) == 0) {
				vx = x[i] - x[f], vy = y[i] - y[f];
				if(vx < 0) {vx = -vx;}
				d = mp(x[i], mod);
			} else {
				int c = __gcd(abs(x[i] - x[f]), abs(y[i] - y[f]));
				vx = (x[i] - x[f]) / c, vy = (y[i] - y[f]) / c;
				if(vx < 0) {vx = -vx; vy = -vy;}
				d = mp(x[i] % vx, y[i] - vy * (x[i] / vx));
			}
			int c = ma[mp(mp(vx, vy), d)];
			int p = ++ma2[mp(mp(vx, vy), d)];
			int e = ((1 + (int)sqrt(1 + 8 * c + eps)) >> 1) - p;
			ans += n - f - 1 - e;
			assert(e >= 0);
		}
		ma2.clear();
	}
	printf("%I64d", ans);

	return(0);
}

// by Kim Andrey


#include <algorithm>
#include <iostream>
#include <sstream>
#include <utility>
#include <cstdlib>
#include <cstring>
#include <cassert>
#include <fstream>
#include <cstdio>
#include <string>
#include <vector>
#include <queue>
#include <cmath>
#include <ctime>
#include <stack>
#include <map>
#include <set>

using namespace std;

#define pb push_back
#define ppb pop_back
#define mp make_pair
#define fs first
#define sc second
#define abs(a) ((a) < 0 ? -(a) : (a))
#define sqr(a) ((a) * (a))

typedef unsigned int uint;
typedef long long ll;
typedef unsigned long long ull;

const double eps = 1e-9;
const int mod = (int)1e+9 + 7;
const double pi = acos(-1.);
const int maxn = 100100;

int x[maxn], y[maxn];
map<pair<pair<int, int>, pair<int, int> >, int> ma, ma2;

int main() {

	#ifdef SOL
	{
//		freopen("input.txt","r",stdin);
//		freopen("output.txt","w",stdout);
	}
	#else
	{
		srand(time(0));
		const string file = "";
		if(!file.empty()) {
			freopen((file + ".in").c_str(), "r", stdin);
			freopen((file + ".out").c_str(), "w", stdout);
		}
	}
	#endif

	int n;
	scanf("%d", &n);
	for(int i = 0; i < n; i++) {
		scanf("%d%d", &x[i], &y[i]);
	}
	for(int i = 0; i < n; i++) {
		for(int f = i + 1; f < n; f++) {
			int vx, vy;
			pair<int, int> d;
			if(abs(x[i] - x[f]) == 0) {
				vx = x[i] - x[f], vy = y[i] - y[f];
				if(vy < 0) {vy = -vy;}
				d = mp(0, y[i]);
			} else
			if(abs(y[i] - y[f]) == 0) {
				vx = x[i] - x[f], vy = y[i] - y[f];
				if(vx < 0) {vx = -vx;}
				d = mp(x[i], mod);
			} else {
				int c = __gcd(abs(x[i] - x[f]), abs(y[i] - y[f]));
				vx = (x[i] - x[f]) / c, vy = (y[i] - y[f]) / c;
				if(vx < 0) {vx = -vx; vy = -vy;}
				d = mp(x[i] % vx, y[i] - vy * (x[i] / vx));
			}
			ma[mp(mp(vx, vy), d)]++;
		}
	}

	ll ans = 0;
	for(int i = 0; i < n; i++) {
		for(int f = i + 1; f < n; f++) {
			int vx, vy;
			pair<int, int> d;
			if(abs(x[i] - x[f]) == 0) {
				vx = x[i] - x[f], vy = y[i] - y[f];
				if(vy < 0) {vy = -vy;}
				d = mp(0, y[i]);
			} else
			if(abs(y[i] - y[f]) == 0) {
				vx = x[i] - x[f], vy = y[i] - y[f];
				if(vx < 0) {vx = -vx;}
				d = mp(x[i], mod);
			} else {
				int c = __gcd(abs(x[i] - x[f]), abs(y[i] - y[f]));
				vx = (x[i] - x[f]) / c, vy = (y[i] - y[f]) / c;
				if(vx < 0) {vx = -vx; vy = -vy;}
				d = mp(x[i] % vx, y[i] - vy * (x[i] / vx));
			}
			ma[mp(mp(vx, vy), d)]--;
		}

		for(int f = i + 1; f < n; f++) {
			int vx, vy;
			pair<int, int> d;
			if(abs(x[i] - x[f]) == 0) {
				vx = x[i] - x[f], vy = y[i] - y[f];
				if(vy < 0) {vy = -vy;}
				d = mp(0, y[i]);
			} else
			if(abs(y[i] - y[f]) == 0) {
				vx = x[i] - x[f], vy = y[i] - y[f];
				if(vx < 0) {vx = -vx;}
				d = mp(x[i], mod);
			} else {
				int c = __gcd(abs(x[i] - x[f]), abs(y[i] - y[f]));
				vx = (x[i] - x[f]) / c, vy = (y[i] - y[f]) / c;
				if(vx < 0) {vx = -vx; vy = -vy;}
				d = mp(x[i] % vx, y[i] - vy * (x[i] / vx));
			}
			int c = ma[mp(mp(vx, vy), d)];
			int p = ++ma2[mp(mp(vx, vy), d)];
			int e = ((1 + (int)sqrt(1 + 8 * c + eps)) >> 1) - p;
			ans += n - f - 1 - e;
		}
		ma2.clear();
	}
	printf("%I64d", ans);

	return(0);
}

// by Kim Andrey


#include <cstdio>
#include <map>
#include <algorithm>
#include <vector>
using namespace std;
#define EPS 1e-9
int n;
map<pair<double,double>,int> m;
vector<pair<int,int>> v;
int main (){
    scanf("%d",&n);
    for(int i = 0 ; i < n ; i ++){
        int x,y;
        scanf("%d%d",&x,&y);
        v.push_back(make_pair(x,y));
    }
    for(int i = 0 ; i < v.size() ; i ++){
        for(int j = i +1 ; j < v.size() ; j ++){
            double difx=v[i].first-v[j].first;
            double dify=v[i].second-v[j].second;
            double r=difx==0?0x7fffffff:dify/difx;
            double x=difx==0?v[i].first:(double)v[i].first-(double)(v[i].second/dify)*difx;
            m[make_pair(r,x)]++;
        }
    }
    int ans=n*(n-1)*(n-2)/6;
    for(auto x:m){
        int num=x.second;
        ans-=num*(num-1)*(num-2)/6;
    }
    printf("%d\n",ans);

}


#include <cstdio>
#include <map>
#include <algorithm>
#include <vector>
#include <cmath>
#include <functional>
using namespace std;
map<int,int> magic;
#define EPS 1e-7
int n;
class cmp{
public:
    bool operator()(const pair<double,double>& x,const pair<double,double>& y)const{
        if(abs(x.first-y.first)<EPS){
            if(abs(x.second-y.second)<EPS)return false;
            return x.second<y.second;
        }
        return x.first<y.first;
    }
};
map<pair<double,double>,int,cmp> m;
vector<pair<int,int>> v;
int main (){
    for(int i = 1 ; i < 2001 ; i ++){
        magic[i*(i-1)/2]=i;
    }
    scanf("%d",&n);
    for(int i = 0 ; i < n ; i ++){
        int x,y;
        scanf("%d%d",&x,&y);
        v.push_back(make_pair(x,y));
    }
    for(int i = 0 ; i < v.size() ; i ++){
        for(int j = i +1 ; j < v.size() ; j ++){
            double difx=v[i].first-v[j].first;
            double dify=v[i].second-v[j].second;
            double r=difx==0?400:dify/difx;
            double x=difx==0?v[i].first:(double)v[i].first-(double)(v[i].second/dify)*difx;
            if(dify==0)x=v[i].second;
            auto it=m.find(make_pair(r,x));
            if(it==m.end())m[make_pair(r,x)]=1;
            else it->second++;
        }
    }
    int ans=n*(n-1)*(n-2)/6;
    for(auto x:m){
        int num=magic[x.second];
        if(num==0){
            printf("!!");
            printf("%lf %lf %d\n",x.first.first,x.first.second,x.second);
        }
        ans-=num*(num-1)*(num-2)/6;
    }
    printf("%d\n",ans);

}


#include <cstdio>
#include <map>
#include <algorithm>
#include <vector>
#include <cmath>
using namespace std;
map<int,int> magic;
#define EPS 1e-9
int n;
class cmp{
public:
    bool operator()(const pair<double,double>& x,const pair<double,double>& y)const{
        if(abs(x.first-y.first)<EPS){
            if(abs(x.second-y.second)<EPS)return false;
            return x.second<y.second;
        }
        return x.first<y.first;
    }
};
map<pair<double,double>,int,cmp> m;
vector<pair<int,int>> v;
int main (){
    for(int i = 1 ; i < 2001 ; i ++){
        magic[i*(i-1)]=i;
    }
    scanf("%d",&n);
    for(int i = 0 ; i < n ; i ++){
        int x,y;
        scanf("%d%d",&x,&y);
        v.push_back(make_pair(x,y));
    }
    for(int i = 0 ; i < v.size() ; i ++){
        for(int j = i +1 ; j < v.size() ; j ++){
            double difx=v[i].first-v[j].first;
            double dify=v[i].second-v[j].second;
            double r=difx==0?0x7fffffff:dify/difx;
            double x=difx==0?v[i].first:(double)v[i].first-(double)(v[i].second/dify)*difx;
            m[make_pair(r,x)]++;
        }
    }
    int ans=n*(n-1)*(n-2)/6;
    for(auto x:m){
        int num=magic[x.second];
        ans-=num*(num-1)*(num-2)/6;
    }
    printf("%d\n",ans);

}


#include <cstdio>
#include <map>
#include <unordered_map>
#include <algorithm>
#include <vector>
#include <cmath>
#include <functional>
using namespace std;
unordered_map<int,int> magic;
#define EPS 1e-7
int n;
class cmp{
public:
    inline bool operator()(const pair<double,double>& x,const pair<double,double>& y)const{
        if(abs(x.first-y.first)<EPS){
            if(abs(x.second-y.second)<EPS)return false;
            return x.second<y.second;
        }
        return x.first<y.first;
    }
};
map<pair<double,double>,int,cmp> m;
vector<pair<int,int>> v;
int main (){
    for(int i = 1 ; i < 2001 ; i ++){
        magic[i*(i-1)/2]=i;
    }
    scanf("%d",&n);
    for(int i = 0 ; i < n ; i ++){
        int x,y;
        scanf("%d%d",&x,&y);
        v.push_back(make_pair(x,y));
    }
    for(int i = 0 ; i < v.size() ; i ++){
        for(int j = i +1 ; j < v.size() ; j ++){
            double difx=v[i].first-v[j].first;
            double dify=v[i].second-v[j].second;
            double r=difx==0?400:dify/difx;
            double x=difx==0?v[i].first:(double)v[i].first-(double)(v[i].second/dify)*difx;
            if(dify==0)x=v[i].second;
            m[make_pair(r,x)]++;
        }
    }
    long long ans=(long long)n*(n-1)*(n-2)/6;
    for(auto x:m){
        int num=magic[x.second];
        ans-=(long long)num*(num-1)*(num-2)/6;
    }
    printf("%I64d\n",ans);

}