#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;
            }
        }
    }

    /// E sad se igraj sa for-om u for-u u for-u u for-u xd
    /// Odredi trapeze i proveri da li su osnovice paralelne

    //usi korisceni[4];

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

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

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

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

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

                    bool 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 k1, k2, k3, k4, k5, k6;
                                        double n1, n2;

                                        /// Prava 1 AB
                                        if(tacke[1].x - tacke[0].x == 0) break;
                                        k1 = (tacke[1].y - tacke[0].y) / (tacke[1].x - tacke[0].x);

                                        /// Prava 2 CD
                                        if(tacke[3].x - tacke[2].x == 0) break;
                                        k2 = (tacke[3].y - tacke[2].y) / (tacke[3].x - tacke[2].x);

                                        /// Prava 3 AD
                                        if(tacke[3].x - tacke[0].x == 0) break;
                                        k3 = (tacke[3].y - tacke[0].y) / (tacke[3].x - tacke[0].x);

                                        /// Prava 4 BC
                                        if(tacke[2].x - tacke[1].x == 0) break;
                                        k4 = (tacke[2].y - tacke[1].y) / (tacke[2].x - tacke[1].x);

                                        /// Dijagonala 1
                                        if(tacke[0].x - tacke[2].x == 0) break;
                                        k5 = (tacke[0].y - tacke[2].y) / (tacke[0].x - tacke[2].x);

                                        /// Dijagonala 2
                                        if(tacke[1].x - tacke[3].x == 0) break;
                                        k6 = (tacke[1].y - tacke[3].y) / (tacke[1].x - tacke[3].x);

                                        if(k1 == k2 && k3 != k4)
                                        {
                                            if(k5 != k6)    /// Proveriti da li se dijagonale tela seku
                                            {

                                                n1 = k1 * (-tacke[2].x) + tacke[2].y;
                                                n2 = k2 * (-tacke[3].x) + tacke[3].y;

                                                Ucesnik tempTacka;
                                                tempTacka.x = (n2 - n1) / (k1 - k2);
                                                tempTacka.y = k1 * tempTacka.x + n1;

                                                if(unutarTela(tacke, tempTacka))
                                                {
                                                    double r1, r2;
                                                    r1 = sqrt(pow(tacka[i].x - tacka[i].y, 2) + pow(tacka[j].x - tacka[j].y, 2));
                                                    r2 = sqrt(pow(tacka[k].x - tacka[k].y, 2) + pow(tacka[l].x - tacka[l].y, 2));

                                                    if(r1 == 2 * r2 || r2 == 2 * r1)
                                                    {
                                                        brojKomisije++;
                                                        e1 = true;
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }

    cout << endl << brojKomisije;

    return 0;
}