#include <iostream>
#include <string>

#include <math.h>

#define MIN_BROJ_UCESNIKA 1
#define MAX_BROJ_UCESNIKA 1500

#define MAX_KOORDINATE    100000000

using namespace std;
typedef unsigned short int usi;

struct Ucesnik
{
    double x, y;
};

bool unutarTela(Ucesnik tacka[4], Ucesnik tempTacka)
{
    if( ( (tempTacka.x >= tacka[0].x && tempTacka.x <= tacka[2].x && tempTacka.y >= tacka[0].y && tempTacka.y <= tacka[2].y) ||
            (tempTacka.x <= tacka[0].x && tempTacka.x >= tacka[2].x && tempTacka.y <= tacka[0].y && tempTacka.y >= tacka[2].y)    ) &&
            ( (tempTacka.x >= tacka[1].x && tempTacka.x <= tacka[3].x && tempTacka.y >= tacka[1].y && tempTacka.y <= tacka[3].y) ||
              (tempTacka.x <= tacka[1].x && tempTacka.x >= tacka[3].x && tempTacka.y <= tacka[1].y && tempTacka.y >= tacka[3].y)    )   )
        return true;
    else
        return false;
}

int main()
{
    usi brojUcesnika;
    usi brojKomisije = 0;
    string str;

    /// Uneti broj ucenika
    getline(cin, str);
    while(true)
    {
        bool uspesno = false;

        unsigned char counter = 1;
        size_t found = -1;
        while(true)
        {
            found  = str.find(' ', found + 1);
            if(found != string::npos)
            {
                counter++;
            }
            else
            {
                break;
            }
        }

        if(counter == 1)
        {
            sscanf(str.c_str(), "%hu", &brojUcesnika);

            uspesno = (brojUcesnika >= MIN_BROJ_UCESNIKA && brojUcesnika <= MAX_BROJ_UCESNIKA) ? true : false;
        }

        if(!uspesno)
        {
            cout << "Pogresan unos, pokusaj opet: ";
            getline(cin, str);
        }
        else
        {
            break;
        }
    }

    Ucesnik tacka[brojUcesnika];
    /// Uneti koordinate svakog ucenika
    for(usi i = 0; i < brojUcesnika; i++)
    {
        getline(cin, str);
        while(true)
        {
            bool uspesno = false;

            unsigned char counter = 1;
            size_t found = -1;
            while(true)
            {
                found  = str.find(' ', found + 1);
                if(found != string::npos)
                {
                    counter++;
                }
                else
                {
                    break;
                }
            }

            int tempX, tempY;

            if(counter == 2)
            {
                sscanf(str.c_str(), "%d %d", &tempX, &tempY);

                if(tempX <= MAX_KOORDINATE && tempX >= -1 * MAX_KOORDINATE)
                {
                    if(tempY <= MAX_KOORDINATE && tempY >= -1 * MAX_KOORDINATE)
                    {
                        uspesno = true;
                        tacka[i].x = tempX;
                        tacka[i].y = tempY;
                    }
                }
            }

            if(!uspesno)
            {
                cout << "Pogresan unos, pokusaj opet: ";
                getline(cin, str);
            }
            else
            {
                break;
            }
        }
    }

    bool e1 = false;
    //int brojKom = 0;

    for(usi i = 0; i < brojUcesnika - 3; i++)  /// A
    {

        for(usi j = i + 1; j < brojUcesnika - 2; j++)  /// B
        {
            if(e1) break;

            for(usi k = j + 1; k < brojUcesnika - 1; k++)  /// C
            {
                if(e1) break;

                for(usi l = k + 1; l < brojUcesnika - 0; l++)  /// D
                {
                    brojKom++;

                    Ucesnik temp[4] = {tacka[i], tacka[j], tacka[k], tacka[l]};

                    e1 = false;
                    for(int a = 0; a < 4; a++)
                    {
                        if(e1) break;
                        for(int b = 0; b < 4; b++)
                        {
                            if(e1) break;
                            if(b == a) continue;
                            for(int c = 0; c < 4; c++)
                            {
                                if(e1) break;
                                if(c == a || c == b) continue;
                                for(int d = 0; d < 4; d++)
                                {
                                    if(e1) break;
                                    if(d == a || d == b || d == c) continue;
                                    {
                                        Ucesnik tacke[4] = {temp[a], temp[b], temp[c], temp[d]};

                                        double r1, r2;

                                        r1 = sqrt(pow(tacka[0].x - tacka[0].y, 2) + pow(tacka[1].x - tacka[1].y, 2));
                                        r2 = sqrt(pow(tacka[2].x - tacka[2].y, 2) + pow(tacka[3].x - tacka[3].y, 2));

                                        if(r1 == 2 * r2 || r2 == 2 * r1){

                                            double k1, k2, k3, k4, k5, k6;
                                            double x;

                                            bool p = true;

                                            if((x = tacke[0].x - tacke[1].x) == 0){p = false;}
                                            k1 = (tacke[0].y - tacke[1].y) / (x);

                                            if((x = tacke[0].x - tacke[2].x) == 0){p = false;}
                                            k2 = (tacke[0].y - tacke[2].y) / (x);

                                            if((x = tacke[0].x - tacke[3].x) == 0){p = false;}
                                            k3 = (tacke[0].y - tacke[3].y) / (x);

                                            if((x = tacke[1].x - tacke[2].x) == 0){p = false;}
                                            k4 = (tacke[1].y - tacke[2].y) / (x);

                                            if((x = tacke[1].x - tacke[3].x) == 0){p = false;}
                                            k5 = (tacke[1].y - tacke[1].y) / (x);

                                            if((x = tacke[2].x - tacke[3].x) == 0){p = false;}
                                            k6 = (tacke[2].y - tacke[3].y) / (x);

                                            if((k1 == k2 || k1 == k3 || k1 == k4 || k1 == k5 || k1 == k1 || k2 == k3 || k2 == k4 || k2 == k5 || k2 == k6 ||
                                               k3 == k4 || k3 == k5 || k3 == k6 || k4 == k5 || k4 == k6 || k5 == k6)){
                                                brojKomisije++;
                                                e1 = true;
                                            }
                                            else if (!p){

                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }

                    ///////////////////////////////////////////////////////////////

                }
            }
        }
    }

    cout << endl << brojKomisije;// << " " << brojKom;

    return 0;
}