#include <bits/stdc++.h>

#define PI 3.14159265358979323846
using namespace std;

struct coord
{
    int x,y;
};

struct duz
{
    float a;
    float len;
};

float findAngle(int x1,int y1, int x2, int y2)
{
    if(x1 == x2)
        return PI/2;
    return atan((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 main()
{
    ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);

    int N;
    int sus = 0;

    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++)
        {
            //cout << i << " " << j << "\t" << findLen(u[i].x,u[i].y,u[j].x,u[j].y) << endl;

            duzi[cnt].a = findAngle(u[i].x,u[i].y,u[j].x,u[j].y);
            duzi[cnt].len = findLen(u[i].x,u[i].y,u[j].x,u[j].y);
            cnt++;
        }
    }

    /*for(int i = 0 ;i<brd;i++)
    {
        cout << duzi[i].a << " " << duzi[i].len << endl;
    }*/

    for(int i = 0;i<brd;i++)
    {
        for(int j = i+1;j<brd;j++)
        {
            /*if(duzi[i].a == duzi[j].a)
                cout << "\t" << duzi[i].len << "\t" << duzi[j].len << "\t" << duzi[i].a << "\t" << duzi[j].a;*/
            if((duzi[i].len == (duzi[j].len * 2) || duzi[i].len == (duzi[j].len / 2)) && duzi[i].a == duzi[j].a)
            {
                //cout << "\tda";
                sus++;
            }
            //cout << endl;
        }
    }
    cout << sus << endl;

    return 0;
}