#include <iostream>

using namespace std;

int tacke[10000][10000];
int linije[10000][10000];
int brojIndexa[1000000];

int main()
{
    int n;
    int kontroleri = 0;

    int index = 0;

    cin >> n;

    for (int i = 0; i < n; i++)
    {
        cin >> tacke[i][0] >> tacke[i][1];
    }

    for (int i = 0; i < n; i++)
    {
        for (int j = 1; j <= n; j++)
        {
            if (tacke[i][0] == tacke[j][0])
            {
                if (tacke[j][1] > tacke[i][1])
                {
                    linije[i][index] = tacke[j][1] - tacke[i][1];
                }
                else
                {
                    linije[i][index] = tacke[i][1] - tacke[j][1];
                }

                index++;
            }
        }

        brojIndexa[i] = index;
        index = 0;
    }

    for (int i = 0; i < n; i++)
    {
        for (int j = 0; j < brojIndexa[i]; j++)
        {
            for (int k = 0; k < n; k++)
            {
                for (int l = 1; l <= n; l++)
                {
                    if (linije[i][j] / 2 == linije[k][l])
                    {
                        kontroleri++;
                    }
                }
            }
        }
    }

    cout << kontroleri / 45;

    return 0;
}