#include <bits/stdc++.h>

using namespace std;

typedef complex<int> point;
typedef complex<float> line;

#define X real()
#define Y imag()
#define SLOPE first
#define DIST second
#define int long long
#define float long double

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

    int n;
    scanf("%lli",&n);

    int lines = ((n*(n-1))/2);
    int tx,ty;
    int lineBR=0;
    point points[n];
    pair<float,float> linearr[lines];
    int rez=0;
    const float inf = std::numeric_limits<float>::infinity();

    for (int i = 0; i < n; ++i) {
        scanf("%lli %lli",&tx,&ty);
        points[i].real(tx);
        points[i].imag(ty);
    }

    for (int i = 0; i < n; ++i) {
        for (int j = i+1; j < n; ++j) {
            complex<float> temp = {(float)points[j].X-(float)points[i].X,(float)points[j].Y-(float)points[i].Y};
            linearr[lineBR].DIST =abs(temp);
            //linearr[lineBR].SLOPE =arg(temp);
            linearr[lineBR].SLOPE = (float)(points[j]-points[i]).Y/(float)(points[j]-points[i]).X;
            ++lineBR;
            //printf("Line[%i][%i].DIST=%f\n\tLine[%i].SLOPE=%f\n",i,j,linearr[lineBR-1].DIST,lineBR-1,linearr[lineBR-1].SLOPE);
            //printf("Line[%i].SLOPE=%f\n",lineBR-1,linearr[lineBR-1].SLOPE);
        }
    }
    //printf("lines: %i\n",lines);
    for (int i = 0; i < lines; ++i) {
        for (int j = i+1; j < lines; ++j) {

            if (linearr[i].SLOPE==linearr[j].SLOPE)
            {
                //printf("LINE[%i][%i]\n",i,j);
                if (linearr[i].DIST == linearr[j].DIST/2 || linearr[i].DIST/2 == linearr[j].DIST)
                    ++rez;
            }
            else if((linearr[i].SLOPE==0. && linearr[j].SLOPE==-0.) || (linearr[i].SLOPE==inf && linearr[j].SLOPE==-inf))
            {
                //printf("LINE[%i][%i]\n",i,j);
                if (linearr[i].DIST == linearr[j].DIST/2 || linearr[i].DIST/2 == linearr[j].DIST)
                    ++rez;
            }
        }
    }

    printf("%lli",rez);

    return 0;
}