#include <bits/stdc++.h>

#define PI 3.14159265358979323846
using namespace std;

struct coord
{
    int x,y;
};

struct duz
{
    float a;
    int len;
};

float findAngle(int x1,int y1, int x2, int y2)
{
    if(x1 == x2)
        return numeric_limits<float>::infinity();
    return (float(y1-y2)/(x1-x2));
}

float findLen(int x1,int y1, int x2, int y2)
{
    return sqrt((x1-x2)*(x1-x2) + (y1-y2)*(y1-y2));
}

int findLen2(int x1,int y1, int x2, int y2)
{
    return ((x1-x2)*(x1-x2) + (y1-y2)*(y1-y2));
}

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);

    int N;
    int sus = 0;
    unordered_map<float,unordered_multiset<int>> um;
    cin >> N;
    coord u[N];
    //cout << setprecision(3);
    int brd = (N*(N-1))/2;
    duz duzi[brd];
    int cnt = 0;
    for(int i = 0; i<N; i++)
    {
        cin >> u[i].x >> u[i].y;
    }

    for(int i = 0; i<N; i++)
    {
        for(int j = i+1; j<N; j++)
        {
            duzi[cnt].a = findAngle(u[i].x,u[i].y,u[j].x,u[j].y);
            duzi[cnt].len = findLen2(u[i].x,u[i].y,u[j].x,u[j].y);

            um[duzi[cnt].a].insert(duzi[cnt].len);

            cnt++;
        }
    }

    /*for (auto i = um.begin(); i != um.end(); i++)
    {
        cout << i->first << " : " << i->second.size() << '\n';
    }*/

    for (auto i = um.begin(); i != um.end(); i++)
    {
        for(auto j = i->second.begin(); j != i->second.end();j++)
        {
            //cout << *j << endl;
            sus += i->second.count((*j)*4);
        }
        //cout << endl;
    }

    cout << sus << endl;

    return 0;
}