#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n = 0; cin >> n;
    vector<double> iksevi;
    vector<double> ipsilon;
    for(int i = 0; i < n; i++)
    {
        int x; cin >> x;
        iksevi.push_back(x);

        int y; cin >> y;
        ipsilon.push_back(y);
    }
    int rez = 0;
    for(int i = 0; i < n; i++)
    {
        double x1 = iksevi[i];
        double y1 = ipsilon[i];

        for(int j = i + 1; j < n; j++)
        {
            double x2 = iksevi[j];
            double y2 = ipsilon[j];

            for(int k = j + 1; k < n; k++)
            {
                double x3 = iksevi[k];
                double y3 = ipsilon[k];

                for(int m = k + 1; m < n; m++)
                {
                    double x4 = iksevi[m];
                    double y4 = ipsilon[m];
                    // AB i DC
                    double AB = (y2 - y1) / (x2 - x1);
                    double DC = (y4 - y3) / (x4 - x3);

                    double d1 = sqrt((x2 - x1)*(x2 - x1) + (y2 - y1)*(y2 - y1));
                    double d2 = sqrt((x4 - x3)*(x4 - x3) + (y4 - y3)*(y4 - y3));

                    if((AB == DC) && ((d1 == 2 * d2) || (d2 == 2 * d1)))
                        rez++;
                    // AC i BD
                    double AC = (y3 - y1) / (x3 - x1);
                    double BD = (y4 - y2) / (x4 - x2);

                    double d3 = sqrt((x3 - x1)*(x3 - x1) + (y3 - y1)*(y3 - y1));
                    double d4 = sqrt((x4 - x2)*(x4 - x2) + (y4 - y2)*(y4 - y2));

                    if((AC == BD) && ((d3 == 2 * d4) || (d4 == 2 * d3)))
                        rez++;
                    // AD i BC
                    double AD = (y4 - y1) / (x4 - x1);
                    double BC = (y3 - y2) / (x3 - x2);

                    double d5 = sqrt((x4 - x1)*(x4 - x1) + (y4 - y1)*(y4 - y1));
                    double d6 = sqrt((x3 - x2)*(x3 - x2) + (y3 - y2)*(y3 - y2));

                    if((AD == BC) && ((d5 == 2 * d6) || (d6 == 2 * d5)))
                        rez++;
                }
            }
        }
    }

    cout << rez << endl;
    return 0;
}