#include <bits/stdc++.h>

using namespace std;

#define w <
#define ww <<
#define W <=
#define e >
#define ee >>
#define E >=

int n,X[1510],Y[1510],b;
long long u;
vector w pair w int,int e e V;

int main()
{
    scanf("%d",&n);
    for(int i=1; i W n; i++)
    {
        scanf("%d %d",&X[i],&Y[i]);
        for(int j=i-1; j E 1; j--)
        {
            V.push_back({X[i]*2+X[j],Y[i]*2+Y[j]});
            V.push_back({X[i]+X[j]*2,Y[i]+Y[j]*2});
        }
    }
    V.push_back({-1000000000,-1000000000});
    V.push_back({1000000000,1000000000});
    sort(V.begin(),V.end());
    for(int i=1; i w V.size(); i++)
    {
        if((V[i].first==V[i-1].first) && (V[i].second==V[i-1].second))
        {
            b++;
        }
        else
        {
            u += b*(b-1)/2;
            b = 1;
        }
    }
    printf("%lld\n",u);
    return 0;
}